FreeBSD/Backups
From Devpit
Contents
Using Dump and Restore
dump
- /dev/sa0 rewind on close
- /dev/nsa0 no rewind on close
- /dev/esa0 eject on close
/sbin/dump 0aLuf /dev/sa0 /
- dump level 0
- a means write till end of tape received
- L means you're backing up a live system
- u means update /etc/dumpdates
- f means filename to dump to
restore
Use mt to control tapes
- Tape operations with mt
- mt rewind - rewind tape
Command line fun
tar czvf - /var | ssh user@example.com "cat > backup-var.tgz" cp -PRp
Moving to a new disk
/stand/sysinstall, fdisk and disklabel new disk, mount somewhere new cd /mnt/new dump -0 -L -f - / | restore -rf -
rsnapshot backups
- This command is nice to find the large files that get backed up every day. Sometimes there'll be a large log file or somethign that should be zipped and archived:
find . -links 1 -type f -size +1000000c | xargs ls -hl