To explain what to do, we will go step-by-step through simple example using configuration files.22
You can go through this demo and later adopt the e.g., the paths to your environment.
For this demo, I'll create a master backup repository in the directory isol-test in my home directory (backup), a source directory to backup (source), copy a file to backup into it and generate a configuration file:
# cd # mkdir isol-test # cd isol-test # mkdir backup source # ls # cp -v /bin/ls source # ls -l source # storeBackup.pl -g stbu.confNext, use an editor of your choice and change the following items in stbu.conf:
sourceDir=source backupDir=backupWe need a full backup so we can copy its meta data to the external media:
# storeBackup.pl -f stbu.conf WARNING 2012.06.09 09:07:57 5647 created directory <backup/default> ... <snip, deleted output of storeBackup.pl>The warning tells you that storeBackup.pl created a subdirectory for the series default.
Now plug in your external media, e.g., a memory stick; it has to be formatted with a Linux file system or with NTFS (not FAT). Make sure it's mounted in the same path always. You can do this in several ways, maybe depending on you distribution and / or the GUI you are using. If you have no idea how to do this, search for "blkid fstab" with an internet search engine like Google or another one.
In the following settings I assume your external media has been mounted at /media/stick. Please adjust the path /media/stick to your local settings!
Now it's time to set up the stick after creating a backup directory /media/stick/stbu on it:
# mkdir /media/stick/stbu # storeBackupSetupIsolatedMode.pl -f stbu.conf -t /media/stick/stbu INFO 2012.06.09 09:27:29 5888 ./isolate-stbu.conf: changed <backupDir> to '/media/stick/stbu' INFO 2012.06.09 09:27:29 5888 ./isolate-stbu.conf: created <mergeBackupDir> as 'backup' INFO 2012.06.09 09:27:29 5888 ./isolate-stbu.conf: setting <otherBackupSeries> to 0:default INFO 2012.06.09 09:27:29 5888 ./isolate-stbu.conf: changed <lateLinks> to 'yes' INFO 2012.06.09 09:27:29 5888 you may want to adjust <./isolate-stbu.conf> to your needsThe program storeBackupSetupIsolatedMode.pl told you, that it had created a new configuration file called isolate-stbu.conf with some adjustments: backupDir has been set to the directory on the stick and lateLinks (storeBackup.pl's option lateLinks) has been switched on. It also created an entry mergeBackupDir which is used by storeBackupMergeIsolatedBackup.pl later to integrate your isolated backups on the stick into the central ones in directory backup (in this example). Finally, otherBackupSeries is set to this backup series only. Generating references to other backup series (which does not exist in this simple example) isn't possible when making backups on your stick.23
# cp /bin/pwd source # storeBackup.pl -f isolate-stbu.confThat's it. Now let's see what happend:
# ls -lh /media/stick/stbu/default/* /media/stick/stbu/default/2012.06.09_09.07.57: total 0 /media/stick/stbu/default/2012.06.09_09.56.36: total 16K -rw------- 1 root root 13K Jun 9 09:56 pwd.bz2As you can see, there is no saved file in the first backup directory (2012.06.09_09.07.57) because meta data was copied by storeBackupSetupIsolatedMode.pl. In the second backup you see the new file pwd but not ls because it wasn't changed. It will be hard linked after being integrated into the master backup. If want to see some internals, you can look into the command file for storeBackupUpdateBackup.pl to see it has to be linked:
# bzcat /media/stick/stbu/default/*/.storeBackupLinks/linkFile.bz2 # link md5sum # existingFile # newLink # compress md5sum # fileToCompress # dir dirName # symlink file # target # linkSymlink link # existingFile # newLink link 92385e9b8864032488e253ebde0534c3 ../2012.06.09_09.07.57/./ls.bz2 ls.bz2You can run as many additional backups as you want, but naturally space on you local media must be sufficient. Use df -h /media/stick (adjust the path to your needs) to see how much space is free. You can also run du to see how much space has been used so far for your isolated backups:
# du -sh /media/stick/stbu/default/* 24K /media/stick/stbu/default/2012.06.09_09.07.57 44K /media/stick/stbu/default/2012.06.09_09.56.36
# storeBackupMergeIsolatedBackup.pl -f isolate-stbu.conf in directory </media/stick/stbu/default>, copy <2012.06.09_09.56.36> to <backup/default> ? yes / no -> yes INFO 2012.06.09 10:15:11 6557 copying data . . . INFO 2012.06.09 10:15:11 6557 finished copying data INFO 2012.06.09 10:15:11 6557 please run INFO 2012.06.09 10:15:11 6557 storeBackupUpdateBackup.pl -b "backup"The program uses the parameter of option mergeBackupDir inserted by storeBackupSetupIsolatedMode.pl to get the path to the master backup. For safety reasons, it asks you if you want to copy the presented list of backups (only one in this example) to the master backup at backup/default. After answering yes, the data is copied.
To get a ``normal'' full backup, run storeBackupUpdateBackup.pl -b backup.
If you use isolated mode in the same way a second time (after re-merging backup to the master backup), you can use option --backupDir of storeBackupSetupIsolatedMode.pl (because you already have a valid configuration file) or simply generate a new configuration file with another name (see option --generate) and use the old one which you may have adjusted to your needs.