January 7, 2005
rsync rocks!
My old buddy Henry has been touting rsync for a long time now, but only recently have I got around to setting it up - and now I must say it rocks!
I’m using it to backup the main stuff - configs, code, content, etc. - from our other servers to our main server, which has a hefty amount of RAID5 storage.
After a few tweaks here and there and a couple of cron jobs later, we’ve got a nice simple backup system up and running without a lot of the headaches of tape or the cost of commercial packages. It was even pretty painless to setup rsync on our Win2K database boxes to rsync the MS-SQL data dumps. (If you didn’t know, rsync is standard on most Linux distros.)

Thats what I have been telling ya. Rsync does indeed rock. The only issue with using it for backups is retention… If you sync every day, then you only have a retention of one day by definition. One possible solution would be to just have 2 backup sets, one that runs every day and the other that goes once a month or byweekly. Thats still not the best solution because you have to at least double your backup size, and retention varies depending on when in the backup cycle it is when you want to do a restore. Rsync has –backup and –suffix flags that can be set to rename files to be overwritten on teh remote size. By programmatically setting these flags with a perl or bash script when rsync is called, you could achieve unlimited retention and version control all at the same time… I’d like to see a tape system do that!
For retension I was just thinking of tarring and gzipping the current backup once a week. You could then burn it off to CD or DVD or even tape if you wanted and then delete the tgz file. And for code, developers _should_ be using CVS or Subversion, which would have some of that built in. (We are planning to use Subversion soon, but aren’t there just yet.)