Phil’s Diary - [Blog @ http://www.philsdiary.net/]
Friday November 5, 2004
Boring Backups

Boring but hey, someone might be interested.

Until now I’ve been using my linux box (with it’s capacious harddisks) to backup a few important fileshares on my windows machine. Each day it would delete the day before yesterdays backup, rename yesterdays back and then backup the files. As a result I only ever had 2 days worth of backups. To be honest all I had space for.

What I did tonight was change the script slightly so that it does a full days backup once a week, and then uses the archive bit to do a differential backup for the other 7 days. The idea being that I then have 7 days of backups.

To be honest this was easier than I’d initially though. smbclient includes a few options to copy files with the archive bit set -Tagc, reseting them as it goes. This allows me to do a differential backup, and then I do -Tac copying all and reseting the archive bit to do the full backup.

The only other compication was writing the simple date/day comparison script around this so that it did the right thing on the right day. This was pretty simple, but linux was a tad picky about the spacing of some of the things.

All done now though.

Posted by Phil on November 05, 2004 07:02 PM | Categories: Technology