How to backup your Mac to Dreamhost with rsync

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 Twomeyhttp://blogs.translucentcode.org/mick/archives/000230.html
Marc Climent – http://codelog.climens.net/2008/12/03/using-dreamhost-backup-account-with-rsync/

 

[gmap]

Posted: Thursday, January 8, 2009 | View Comments
  • .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.
  • It is good that All Dreamhost hosting accounts now come with 50gb of free personal backup
  • okazii
    yeah you're right
  • buckyo
    It all went perfectly well. Thanks.

    Found earlier, and similar instructions elsewhere but was struggling with saving the password.

    Thanks again.
  • Nice information presented in the post, thanks for sharing such a great post.
  • I don't have any Mac item. So, this is not usable for me. I will forward it to my friend.
  • Jeff
    Chris,

    Thanks for working on this. Did you ever figure out how to automate the process?
  • thank you for the tutorial.
  • yellowbeard
    Thankx I have been looking for this exact thing.
blog comments powered by Disqus
  • About Me

    Hi, my name is Chris Hutchins, and I'm a former investment banker turned a freelance consultant who just finished a 7-month trip around the world. I live in San Francisco and spend my free time rock climbing, fooling around with technology and managing my latest project, LaidOffCamp.

    Full bio on LinkedIn
  • Twitter

    follow me on twitter here
  • Photos

    Taj Mahal from Agra FortTaking a Break from ClimbingAround Fatehpur Sikri #1Reflections of the Taj MahalPyramids of Giza #1Rusted Lightpole in DahabCamels in the Wadi Rum DesertA coin in a tree for good luck...Aleppo Citadel TowerA Boy Running to Get Food
    More photos on Flickr...