Quick Remote Encrypted Backups for Linux

Quick Remote Encrypted Backups for Linux

Some folks will shake thier heads at the idea of doing a dump on a
live file system, but it does work in most cases. Further you can then
copy that file over the network using dd if you like. Below is an
example cron:

#dump both partitions hda1 and hda2 to the backup server.

# time /sbin/dump -0 -j -f – /dev/hda1 | ssh username@ dd
of=/path/on/remote/host/hda1_backupfile.`date -I`.dmp && time
/sbin/dump -0 -j -f – /dev/hda2 | ssh username@backupserver dd
of=/path/on/remote/host/hda2_backup.`date -I`.dmp >> /tmp/backup.log

Keep in mind this is using an ssh encrypted session with installed
keys for the user “username”, and the users who runs it has privs for
system-wide backups.

The simple manual version of this is:

# /sbin/dump -0 -j -f – /dev/hda1 | ssh username@ dd
of=/path/on/remote/host/hda1_backupfile.`date -I`.dmp

The above will dump just hda1 to the remote host, and not give any
time data, or keep a log like the previous cron example will.

Posted in Reviews, Recommendations, Best Practices

Leave a Reply

Your email address will not be published. Required fields are marked *