Hitchhiker's Guide to Openbsd
- Perform a level 0 dump, get everything ● a
Download 1.27 Mb. Pdf ko'rish
|
obsd-faq49
0 - Perform a level 0 dump, get everything
● a - Attempt to automatically determine tape media length ● u - Update the file /etc/dumpdates to indicate when backup was last performed ● f - Which tape device to use (/dev/nrst0 in this case) Finally which partition to backup (/dev/rsd0a, etc.) The mt(1) command is used at the end to rewind the drive. Review the mt man page for more options (such as eject). http://www.openbsd.org/faq/faq14.html (19 of 34)9/4/2011 10:02:25 AM 14 - Disk Setup If you are unsure of your tape device name, use dmesg to locate it. An example tape drive entry in dmesg might appear similar to: st0 at scsibus0 targ 5 lun 0: You may have noticed that when backing up, the tape drive is accessed as device name " nrst0 " instead of the " st0 " name that is seen in dmesg. When you access st0 as nrst0 you are accessing the same physical tape drive but telling the drive to not rewind at the end of the job and access the device in raw mode. To back up multiple file systems to a single tape, be sure you use the non-rewind device, if you use a rewind device ( rst0 ) to back up multiple file systems, you'll end up overwriting the prior filesystem with the next one dump tries to write to tape. You can find a more elaborate description of various tape drive devices in the dump man page. If you wanted to write a small script called "backup", it might look something like this: echo " Starting Full Backup..." /sbin/dump -0au -f /dev/nrst0 /dev/rsd0a /sbin/dump -0au -f /dev/nrst0 /dev/rsd0d /sbin/dump -0au -f /dev/nrst0 /dev/rsd0e /sbin/dump -0au -f /dev/nrst0 /dev/rsd0h echo echo -n " Rewinding Drive, Please wait..." mt -f /dev/rst0 rewind echo "Done." echo If scheduled nightly backups are desired, cron(8) could be used to launch your backup script automatically. It will also be helpful to document (on a scrap of paper) how large each file system needs to be. You can use " df -h " to determine how much space each partition is currently using. This will be handy when the drive fails and you need to recreate your partition table on the new drive. Restoring your data will also help reduce fragmentation. To ensure you get all files, the best way of backing up is rebooting your system in single user mode. File systems do not need to be mounted to be backed up. Don't forget to mount root (/) r/w after rebooting in single user mode or your dump will fail when trying to write out dumpdates. Enter " bsd -s " at the boot> prompt for single user mode. Download 1.27 Mb. Do'stlaringiz bilan baham: |
Ma'lumotlar bazasi mualliflik huquqi bilan himoyalangan ©fayllar.org 2025
ma'muriyatiga murojaat qiling
ma'muriyatiga murojaat qiling