Best procedure for full backup of live system

Warren Block wblock at wonkity.com
Fri Oct 16 14:34:03 UTC 2009


On Fri, 16 Oct 2009, Nerius Landys wrote:

> Thanks again guys.  My final series of steps to take full backups:
>
> bsdlabel ad4s1                    | ssh -p 22222 nlandys at localhost dd
> of=/home/nlandys/backup/bsdlabel_ad4s1
> dmesg -a                          | ssh -p 22222 nlandys at localhost dd
> of=/home/nlandys/backup/dmesg
> dd if=/dev/ad4 bs=512 count=1     | ssh -p 22222 nlandys at localhost dd
> of=/home/nlandys/backup/MBR
> cat /etc/fstab                    | ssh -p 22222 nlandys at localhost dd
> of=/home/nlandys/backup/fstab
> dump -0Lan -f - / | gzip          | ssh -p 22222 nlandys at localhost dd
> of=/home/nlandys/backup/dump0-root.gz
> dump -0Lan -f - /tmp | gzip       | ssh -p 22222 nlandys at localhost dd
> of=/home/nlandys/backup/dump0-tmp.gz
> dump -0Lan -f - /var | gzip       | ssh -p 22222 nlandys at localhost dd
> of=/home/nlandys/backup/dump0-var.gz
> dump -0Lan -f - /usr | gzip       | ssh -p 22222 nlandys at localhost dd
> of=/home/nlandys/backup/dump0-usr.gz
>
> ... where port 22222 on localhost is a pipe to my remote desktop with
> the 500 GB harddrive.  If I missed anything important please let me
> know.

The dump man page recommends always using -C with snapshot dumps.

The Handbook has an example of dump over ssh that shows a couple of 
speed optimizations:

http://www.freebsd.org/doc/en_US.ISO8859-1/books/handbook/backup-basics.html#AEN25817

gzip -2 and bluefish instead of 3des should be faster than the default.

-Warren Block * Rapid City, South Dakota USA


More information about the freebsd-questions mailing list