Thread: rsync
View Single Post
Old 03-05-2008, 01:57 PM   #2
daudi
Addict
daudi has learned how to read e-booksdaudi has learned how to read e-booksdaudi has learned how to read e-booksdaudi has learned how to read e-booksdaudi has learned how to read e-booksdaudi has learned how to read e-booksdaudi has learned how to read e-booksdaudi has learned how to read e-books
 
Posts: 281
Karma: 904
Join Date: Oct 2007
Location: Kent, UK
Device: iRex iLiad, Psion 5MX, nokia n800
Background: I recently lost some scribbles (ipdf failed on me). Fortunately I had most of it backed-up, but not all. It occurred to me that it is not easy to backup content on the iliad if you are away from your PC for a long time, so it is possible to write a load of scribbles during a day and then lose them before you can back up (I guess that's one advantage of the image-based notes---they create merged images on-the-fly).

The attached is a script (and manifest file) that uses thetechnobear's rsync to backup the contents of /mnt/free to a usb key. Simply changing /mnt/usb/backup to /mnt/cf/backup would use the compact flash. I have decided to make it do incremental backups, giving each most recent previous backup a suffix of the date and time of the current backup. The first time you run it you have enough time to make coffee because it backs everything up, but after that it seems to be fairly quick. The contentlister entry is updated with the last date and time the backup is run.

Note that this attachment is just the script. You'll have to copy rsync to /usr/bin as instructed by thetechnobear and possibly make it executable with
Code:
chmod +x /usr/bin/rsync
for this to work.
Attached Files
File Type: zip rsync-backup.zip (1.1 KB, 462 views)
daudi is offline   Reply With Quote