How to Backup your Mac

So I got this fancy new LaCie Firewire external HD this week, with the purpose (among other things) of using it as a Backup drive.

Maybe the easiest way to do so is to fire up Disk Utility (under /Applications/Utilities), and copy your entire disk to a partition in the Firewire disk.



The process is really easy. Select the external drive from the sidebar, choose the Restore tab, drop Macintosh HD from the sidebar to the Source textarea, and drop in the same way your Backup partition into Destination.



Click the Restore button and the operation will start.
If your drive crashes in the future, you can reverse the operation and you will have an exact copy.

This method has an advantage, and that is you can use the Firewire Disk (not an USB disk) to boot your system.

The obvious disadvantage is that you can not make incremental backups. Every time you want to update your backup, you will have to start over again.

The second option is using some third-party software that manages the backup. Carbon Copy Cloner (free) or SuperDuper ($27.95) are good examples. The latter is probably better, and more flexible.


Anyway, I didn't want to pay anything, and I was not really convinced by Carbon Copy Cloner and provided that MacOS has rsync, I decided to use it.

As you will see, it is fairly easy to use rsync to create a backup, but if you don't feel comfortable around the Terminal, you have a GUI frontend for rsync called RsyncX.

Actually, the only directory I want to backup is the /Users directory, and particularly my /Users/daniel home directory, so this is the command I will issue, copying the contents to the Backup/ directory in my Firewire drive:

macbookpro:~ daniel$ rsync --verbose --archive --delete /Users/daniel/ /Volumes/Firewire/Backup/
building file list ...
...
sent 39373754756 bytes  received 1004680 bytes  14805324.10 bytes/sec
total size is 39365457061  speedup is 1.00

The explanation of the options used follow:

--archive is equivalent to -rlptgoD, which means Recursive, copy symLinks, preserve Permissions, preserve Times, preserve Group, preserve Owner, preserve Devices

--delete will delete the files in the backup that do not exist in the source (maybe you should think if you want this)

--verbose outputs the files that are being copied. Nice for the first time, but remove it afterwards.

The next time you execute rsync, it will almost always be done in less than 5 minutes, as it synchronizes the data, and will only copy new or modified files.

You can even copy the whole drive with this method if you want. The only thing you need to remember is to precede the command with sudo if you are copying files outside your home directory.

Now, let's automate this process using crontab. Open a Terminal, type crontab -e and write the following (this example will execute the backup everyday at 2:00am):
0 2 * * * rsync --archive --delete /Users/daniel/ /Volumes/Firewire/Backup/

Or this, will run the backup each 15th of every month at 1:00am:
0 2 15 * * rsync --archive --delete /Users/daniel/ /Volumes/Firewire/Backup/




 


Trackback

Trackback URL for this entry:
http://www.gra2.com/trackback.php/how-to-backup-your-mac

No trackback comments for this entry.

Comments

Post a comment

Search



About

newton.gra2.com is a blog about technology, opinion and random thoughts written by Daniel Alvarez, a computer engineer currently living in Zurich, Switzerland.

Topics

News (20/0)
Manuals (24/0)
Security (7/0)
Music (3/0)
Weeklog (1/0)
Personal (34/0)
Photos (3/0)
Opinion (14/0)
Windows (5/0)

Blogroll

Pros i contres (Jordi)
Entrepa de fusta (Oriol)
Spaghetti Code (Isaac)
Made in net (Eric)
Nogare (Juan)
Blog de Isaac Jimenez
Web d'en Jaume Benet
Montcada Wireless (Fran)
Blog d'en Ricard Forniol
Angela Fabregues
in.solit.us

Libertad Digital
FOX News
The Wall Street Journal
The Washington Times
The Jerusalem Post

Michelle Malkin
Eurabian News
Nihil Obstat
Barcepundit
Expose the left
Davids Medienkritik
Johan Norberg
Ayaan Hirsi Ali

User Functions

:

:


Lost your password?

Latest posts

Stories

No new stories

Comments last 2 days


Trackbacks last 2 days

No new trackback comments

Links last 2 weeks

No recent new links