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
Original content copyright ©1995-2006 Eric Dobbs, except where otherwise noted.
