[plug] Re: Backups

Steve Grasso steveg at calm.wa.gov.au
Tue Nov 18 17:34:36 WST 2003


As long as we're all sharing scripts (hi Brad!) I've used the following 
method to do network backups of drive partitions using a combo of dd, gzip 
and SSH:

1. The partition to be backed up must be unmounted.
2. The following does the trick:
dd if=/dev/partition_to_be_backed_up | gzip | \
ssh user_name at backup.server dd of=name_of_backup_file.gz

As an example, the following backs up an image of a floppy disk (not very 
useful, but it gives you the idea):
dd if=/dev/fd0 | gzip | ssh user_name at backup.server dd of=floppy.img.gz

3. To restore a backed-up partition across a network:
(From the backup server)
dd if=name_of_backup_file.gz | gzip -d | ssh \
user_name at target.server dd of=/dev/target_partition

To complete the floppy disk example:
dd if=floppy.img.gz | gzip -d | ssh user_name at target.server dd of=/dev/fd0

Cheers,
Steve
_______________________________________________
plug mailing list
plug at plug.linux.org.au
http://mail.plug.linux.org.au/cgi-bin/mailman/listinfo/plug


More information about the plug mailing list