October 07, 2003

Backups over ssh    [ Software ]

Quick reference (mostly for myself :) just in case I need to run backups over ssh.   srchost = source machine, dsthost = destination machine, FILES = directory with files that needs to be backed up.   Assumes there's a "backups" user with appropriate auth to access FILES and perform backups.   Also assumes GNU tar, prepend a '-' to tar's arguments if it's not.

Tape backup
backups@srchost$ tar cvfz - /FILES | ssh backups@dsthost "dd of=/dev/st0"

File backup
backups@dsthost$ ssh backups@srchost "tar cvfz - /FILES" > FILES-`date +%Y%m%d`.tgz

Posted by edobbs at October 7, 2003 05:19 PM