hhhhhhh iiii kkkkkkkk h:::::h i::::i k::::::k h:::::h iiii k::::::k h:::::h k::::::k h::::h hhhhh iiiiiii cccccccccccccccc k:::::k kkkkkkkuuuuuu uuuuuu ppppp ppppppppp h::::hh:::::hhh i:::::i cc:::::::::::::::c k:::::k k:::::k u::::u u::::u p::::ppp:::::::::p h::::::::::::::hh i::::i c:::::::::::::::::c k:::::k k:::::k u::::u u::::u p:::::::::::::::::p h:::::::hhh::::::h i::::i c:::::::cccccc:::::c k:::::k k:::::k u::::u u::::u pp::::::ppppp::::::p h::::::h h::::::h i::::i c::::::c ccccccc k::::::k:::::k u::::u u::::u p:::::p p:::::p h:::::h h:::::h i::::i c:::::c k:::::::::::k u::::u u::::u p:::::p p:::::p h:::::h h:::::h i::::i c:::::c k:::::::::::k u::::u u::::u p:::::p p:::::p h:::::h h:::::h i::::i c::::::c ccccccc k::::::k:::::k u:::::uuuu:::::u p:::::p p::::::p h:::::h h:::::hi::::::ic:::::::cccccc:::::ck::::::k k:::::k u:::::::::::::::uup:::::ppppp:::::::p h:::::h h:::::hi::::::i c:::::::::::::::::ck::::::k k:::::k u:::::::::::::::up::::::::::::::::p h:::::h h:::::hi::::::i cc:::::::::::::::ck::::::k k:::::k uu::::::::uu:::up::::::::::::::pp hhhhhhh hhhhhhhiiiiiiii cccccccccccccccckkkkkkkk kkkkkkk uuuuuuuu uuuup::::::pppppppp p:::::p p:::::p p:::::::p p:::::::p p:::::::p ppppppppp hickup is a small python script that performs incremental backups to tar files. Detecting file changes is performed by storing a log file containing hashes of each file. Whilst this makes the script very slow/processor intensive, it also means it works on VFAT file systems, which normal tar backups choke on (because the modification time seems to be damaged in some way). hickup is released under the GPL v2 and as is described in the GPL, is distributed in the hope that it will be useful, but WITHOUT ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. For more info, bug reports or comments you can try score5.org or e-mail metrics at the same domain. 1 BEHAVIOUR -------------------------------------------------------- hickup only supports backing up one entire directory at a time and does not follow symlinks. When hickup is run for the first time, it performs a hash of all the files in the target folder and then creates a tar of the folder. The following files will be created in the specified directory (or in the current one if none is specified)... backup.log backupYYYYmmddHHMMSS.tar backupYYYYmmddHHMMSS.log where 'backup' is replaced by the name given to hickup (using -n) and YYYYmmddHHMMSS is the current year, month, date, hour, minute and seconds. After this initial backup, each time hickup is run it will read the backup.log file and determine what files have changed, generating a new pair of dated tar and log files. backup.log is also rewritten and therefore is always the same as the most recent dated log file. 2 ARGUMENTS ----------------------------------------------------------- A listing of the arguments -b --backup Perform a backup. -r --restore Perform a restore. -v --verbose Run in verbose mode. -f --finalise Delete non-existent files from restore. -c --cleanup Remove old tar and log files. -m --master Perform a master backup. -n --name= Backup name (default: backup) 3 USAGE EXAMPLES ---------------------------------------------------- 3.1 BACKUPS In this example we will backup the directory /share/stuff to the directory /var/backup with the backup name 'mystuff'. The command to perform the backup would be hickup -vbn 'mystuff' /share/stuff /var/backup which means 'perform a (v)erbose (b)ackup with (n)ame 'mystuff' of /share/stuff to /var/backup' Whenever a backup should be run, simply run this command. Once the backup is completed, you can copy the mystuffYYYYmmddHHMMSS.tar and mystuffYYYYmmddHHMMSS.log to another location (such as CD). To remove the tar and log files, run hickup -vcn 'mystuff' /var/backup The critical part of the cleanup is that the mystuff.log file is left in place, as that is the file used to track the backup state. If you remove this file, the next backup will not be incremental, but will be a master backup. Alternatively, a master backup can be performed using hickup -vbmn 'mystuff' /share/stuff /var/backup 3.2 RESTORING In this example, we will cover restoring the backups from /media/cdrom to the directory /share/stuff with the backup name 'mystuff'. If all the past backups are located in /media/cdrom then the command to restore is hickup -vrfn 'mystuff' /media/cdrom /share/stuff which means 'perform a (v)erbose (r)estore of backup 'mystuff' stored in /media/cdrom to /share/stuff'. Note the -f switch which causes hickup to 'finalise' the backup, that is, delete all the files in /share/stuff that weren't present in the last known backup. If the backups are spread across multiple CDs then the easiest way to perform the restore is to insert and mount the first/oldest CD and run hickup -vrn 'mystuff' /media/cdrom /share/stuff Continue this for all the remaining CDs in order, with the exception of the final disc when you want to finalise the backup with hickup -vrfn 'mystuff' /media/cdrom /share/stuff