I'm developing an Advanced Backup Script. Any interest?
I've been slowly improving a shell script I wrote to make backups because I have never found anything that fits my situation..
My situation:
I have a RAID array with 6 top level directories that I want to be able to back up indepentantly of each other. That counts dump out right there..
I need multiple volumes of a given size. Tar does multi-volumes, but is terrible in implementation as it is still tape oriented.. My original script simply numbered multi-volume output of tar.
I need the archive prog to avoid duplicate files.. EG: incremental backups. I originally did this by using the mod time, but this is not a cure all.
I have a second machine that may copy files onto the RAID array. It's unix based, so the mod time may be before the last backup date. Thus, if I relied on modtime, the file wouldn't get backed up.
My solution:
I have a shell script that currently parses the command line, and uses tar to generate numbered multivolume archives of arbitrary length. It generates two "find ./" of the directory to be backed up, one for directories and one for files and includes that in the backup. Currently it uses modtime to detect which files to backup, however I'm going to change that.
I am changing it so that a text file listing mod time, file size, and name is maintained. It indicates the contents of each backup file created as well as the current file system contents.
The idea of this file is that, if the file system is to be restored, the current status can be used to delete files that were backed up but no longer present. Also, it can be used to quickly locate any backed up file. One advantage here is that if I download a file, back it up, and later delete it, I will be able to easily check to see if I accidently dled it again so that I can avoid duplication. Also, by comparing exact file sizes, I can easily generate lists of possible duplicate files with differing names.
All of this is done using bash scripting. Might there be any public desire for such a tool if I polished it abit for general useage? If so, I could list it on freshmeat or something.
|