Rsync – The Free Backup Solution

Before you dive into this article you need to know that you will be using the terminal. The terminal can look really scary but trust me it’s not all that bad.

Rsync is a command line utility that can sync your data to other places on your hard drive, from hard drive to hard drive or from computer to computer! I personally use Rsync to make daily backups of my websites, to make a backup of all my music and to move my MySQL databases from one server to another. Rsync is included with every install of OS X and is available for Unix and Linux.

Let’s make up a story to use as an example! Joe Brown has a PowerMac G5. He stores all of his music in the Music folder in his home folder. It looks something like this – /Users/joebrown/Music/. That’s the path to his music. Joe Brown is an intelligent user and knows that he should backup whatever data is important to him. Joe Brown goes to Small Dog Electronics and picks up an external hard drive. He gets home and plugs it into his computer. Joe Brown renames his new hard drive to ‘Audio’. The path to the new hard drive is /Volumes/Audio/ (you’ll also find Macintosh HD in /Volumes/. All the hard drives and flash keys, and other storage devices are kept in /Volumes/). Joe Brown wants to sync all the music from /Users/joebrown/Music/ onto his new hard drive.

The command Joe Brown uses in his terminal window is:

rsync -avz /Users/joebrown/Music/ /Volumes/Audio/

This command will synchronize files from Joe’s internal hard drive (specifically his music) to his new external hard drive called ‘Audio’.

This is a simple, basic way to use rsync. This example should help you sync from one place on your hard drive to another or an external hard drive.

A similar command:

rsync -avz /Users/joebrown/Music/ /Users/joebrown/Desktop/

will sync your music to your desktop. Although that doesn’t seem practical it’s completely doable!

Rsync can be automated with other command line utilities. For example I set my rsyncs to run in the early morning hours so they don’t disturb my users. You may set your rsync to run in the morning hours too or the late evening, whenever it’s convenient for you. The utility that allows you to schedule this is called a cron. You can have 1 or 2 or 100 crons. Each cron has a command that it will run at a specific time. Crons are a whole other blog post, but here’s a couple links about rsync and crons!

Readers are more then welcome to email me if they need help!

Rsync Home page
Rsync Examples
Wikipedia – Rsync
Wikipedia – Cron
Automating Tasks w/ Crons
Intro to Cron
Cron Help Guide


Similar Posts

  • Extending Your Wireless Network

    I’ve written about this in brief before, but after actually setting up a wireless network using an Airport Extreme 802.11n and an Airport…

  • Bandwidth on .Mac?

    I’ve been using my .Mac account more then ever the past few weeks, especially since Apple updated iWeb to version 1.1, and improved…

  • Display Your .Mac Bandwidth Usage

    Uploaded with Skitch! If you host a podcast or have a large photo gallery, keeping an eye on how much bandwidth you use…

  • Automatically Backup MySQL Databases!

    This is for you MySQL users out there. This nifty script really helps with backing up your MySQL databases. It even has rotation…

  • SCREENCAST: Changing Window Appearance

    (You’ll need QuickTime and JavaScript enabled to watch the video.) If you would like to view a larger version of this screencast click…

  • Laptop Battery Conservation Tips

    By Matt@Smalldog.com Small Dog’s home base in Waitsfield experienced an unexpected power outage this morning. I wrote this on a MacBook Pro Core…