14.01.2010
Backup with tar and ssh
von mks.
Backup with:
# tar zcvf - /data/to/backup | ssh user@backupserver "cat > /path/to/backup.tar.gz"Restore a backup with:
# cd / # ssh user@backupserver "cat /path/to/backup.tar.gz" | tar zxvf -
Howto extend this with GPG? Update: Thanks GibKing!
Backup with GPG:
# tar czf - /data/to/backup | gpg -e –default-recipient-self | ssh user@backupserver “cat > /path/to/backup.tar.gz.gpg”Restore with GPG:
# ssh user@backupserver “cat /path/to/backup.tar.gz.pgp” | gpg -d|tar xzf -Remember that all the commands after a ‘#’ sign are in one line!