Author Topic: Easy Backup With tar, gzip and ssh  (Read 644 times)

Offline scotbuff

  • Sys Admin
  • UNIX User
  • *****
  • Posts: 174
  • Karma: +2/-0
    • View Profile
    • Scott.Buffington.me
Easy Backup With tar, gzip and ssh
« on: February 03, 2006, 08:59:57 pm »
Over the years I have come to love ssh and it's ability to make doing things across multiple machines so easy.  Here is how I quickly backup all my personal files on my Mac directly over to my Linux server. 

tar cf - /Users/scotbuff/ | gzip -c | ssh 192.168.0.102 "cat > macbackup.tar.gz"

You can easily script this to run on a regular basis and have a quick and easy backup.  The great thing about this method is that you are easily backing up to another machine.  You cannot get a cheaper backup alternative.  I use an old machine running Linux, sure beats dropping any change on an external harddrive.  Give it a try and feel free to include some interesting ways that you use ssh.
« Last Edit: February 11, 2006, 10:40:53 pm by scotbuff »