How to backup your Mac to Dreamhost with rsync

Written by chris on January 8, 2009 – 3:57 pm

All Dreamhost hosting accounts now come with 50gb of free personal backup.I’ve been searching for a while on a good tutorial for this and couldn’t find one, so I thought I would make my own.

1. Setup passwordless login for rsync (can be skipped if you don’t mind typing your password each time you want to sync)

  • Open terminal and type the following (press return after each line)
  • “ssh-keygen -t dsa” (press enter after all three prompts)
  • “scp ~/.ssh/id_dsa.pub remote”
  • “cat ~/.ssh/id_dsa.pub >> ~/.ssh/authorized_keys”
  • “chmod 644 ~/.ssh/authorized_keys”
  • “sftp backupusername@backup.dreamhost.com”
  • “lcd /Users/OSXUsername/.ssh
  • “mkdir .ssh”
  • “put authorized_keys .ssh”

2. Sync your files / folders

  • Open terminal and type the following, then press return
  • “rsync -avz BackupFolder backupusername@backup.dreamhost.com:DestinationFolder” (example: “rsync -avz ~/Documents bxxxxxx@backup.dreamhost.com:macbook_backup”)
  • Optionally, you can add “–delete” after “-avz” (ie: “-avz –delete “) if you want to delete files on your backup once they’ve been deleted locally

3. Automate the backup process

  • Still working on this, check back later or leave some advice in the comments. Thanks!

Sources of information:

Michael Twomey - http://blogs.translucentcode.org/mick/archives/000230.html
Marc Climent - http://codelog.climens.net/2008/12/03/using-dreamhost-backup-account-with-rsync/

 

Share

Viewing 11 Comments

 

Trackbacks

(Trackback URL)

close Reblog this comment
blog comments powered by Disqus

About Me

Picture of Me Hello, my name is Chris Hutchins, and I'm a technology enthusiast. On this site I'll share my knowledge, discovery and experiences related to technology, startups, life in SF and more. I'm now a self-employed consultant and avid rock climber, but have formerly been an investment banker and management consultant. Check out my bio or connect with me on other networks:

   My Facebook Profile My Twitter My LinkedIn My Flickr My Digg My Digg My Brightkite My Feedburner My FriendFeed My MyBlogLog
Find entries: