We've set the date!
Thursday, March 29th, 2007We've set the date for our wedding and the website is up - check it out here
We've set the date for our wedding and the website is up - check it out here
The AppleTV arrived while I was away on Monday. I got around to connecting it up yesterday and boy is it cool. Gone are the days of needing loads of lounge space to store all those DVDs and videos, welcome to digital media!
More once I’ve played with it for more than a few minutes but first impressions are excellent.
I was explaining to a couple of friends how I backup our music & other data and thought I'd write it up for others to benefit from.
My first requirement is that the backup be done automatically. The problem with backing up data manually is that it relies on you to perform the backups. If you're anything like me you won't remember to do this and when your system crashes you'll have lost all of your data since your backup.
My second requirement was that the solution had to maintain file permissions, so that upon restore the security of the files would be maintained.
My final requirement was that the solution had to be able to run even when I was on the road. I travel a lot and can be away for a week or two at a time. This is when I need a backup solution, as my laptop is most likely to be damaged or nicked when I'm away.
So after looking around at what was available I decided upon rsync. This utility is built in to OS X (as well as other *nix systems - you can also get a Windows version if you want), so it requires little or no setup.
So what did I do?
Well, I first of all listed out all the directories on my laptop that I wanted backed up. It's important to make sure you keep this list updated, so you don't backup unwanted information or miss vital data.
Using this list I created a bash script which passed my directories to backup to the rsync command. My backup involved me backing up my data from my laptop to the mac at home. The command looks like this:
rsync -avz -e ssh /Users/chris /MyData chris@myserver.com:/Backup/chris.
I'll explain the break down of the command:
-a this tells rsync to use archive mode, e.g. it keeps all file permissions intact - check out man rsync for more info.-v this makes the output verbose - I have this emailed to me, so I can check what was backed up.-z this compresses the file data-e ssh this tells rsync that my target location should be accessed over ssh. This enables me to use my public IP address so that I can backup my data securely whilst on the road./Users/chris and /MyData are my directories I want backed up. You can list out as many directories as you like here.chris@myserver.com:/Backup/chris is my target, where I want the data stored. I use certificate based authentication to prevent password prompts. If you're going to do this, keep your certificate in a safe place and limit what the user can do.
Once the shell script is in place, you can insert a cron job to perform the backup automatically for you. I have mine set to run every night at 2am. Check out man cron and crontab for more info.
This backup solution means I can have all my machines backing up to the home machine, over a secure connection, maintaining file permissions and done automatically.
Hopefully this will help you to get started, leave a comment if you have any questions.
