Quick start using storeBackup's Replication Wizard

This example is aimed at users who have at least some experience with storeBackup and who have at least one existing backup created by storeBackup. If you have zero experience with storeBackup, learn to make a master backup before you begin considering the replication of your backups. If you are an advanced user, later sections in this document will explain all the details not covered in this quick start.

storeBackup's Replication Wizard (storeBackupReplicationWizard.pl) will set up your environment so that you can immediately begin using storeBackup's replication features for the most typical replication scenarios. storeBackup's Replication Wizard is an interactive program. It does lots of checks and it prompts you when needed.

The Replication Wizard creates three configuration files. You can certainly set up storeBackup's replication without using the Replication Wizard and we will give you all the information you need in order to do so - see the sections below. However, in this example we want to show you how to get started with storeBackup's replication features as quick as possible (assuming your replication needs are typical).

If you do not run your backups with option lateLinks at the moment and want to use replication, you have to enable option lateLinks when using storeBackup.pl. See section 7.8.5 for more information. Also note that in this example, the option lateLinks will be set correctly by the wizard.

Now, and in the future, you will set lateLinks=yes in the configuration file and use these two commands (which could be put into one executable script):

# storeBackup.pl -f stbu.config
# storeBackupUpdateBackup.pl -b <dirOfMasterBackup>

In the example below $<$dirOfMasterBackup$>$ will be /masterBackup, but in practice use your actual location. Likewise, use the actual name of your config file instead of stbu.config.

This example assumes we have these four different directories involved:

  1. /home which you want to save
  2. /masterBackup where your master Backup is located
  3. /extDisk/backupCopy the location to which you want to replicate your master backup. (This becomes the backup copy.)
  4. /deltaCache which is a place to keep the deltas until they are delivered to the backup copy
You need write permissions in all of these directories.

Furthermore, we assume the backup series you want to copy is named homeBackup. For more information about backup series, have a look at Quick Start. This example also assumes you already have backups in your master backup repository. We will copy the backups from series homeBackup to the replication location to seed the replication process. If you do not have any existing backups, see the other examples such as section 7.8.4 (or make a backup and then return to this section).

Let's begin:

  1. copy the existing backup(s) to get a base for the replication. This can take a while.
    # linkToDirs.pl /masterBackup/homeBackup -t /extDisk/backupCopy

  2. Next, take a quick look at the Replication Wizard help:

    storeBackupReplicationWizard.pl -h

  3. Now run the Replication Wizard, telling it the location of the master backup, the deltaCache and the location to which you wish to replicate (copy) the master backup. None of those three directories is allowed to be a subdirectory of the others. See section Basic concepts to know before using storeBackup's replication for more information.

    storeBackupReplicationWizard.pl -S homeBackup -m /masterBackup -c /extDisk/backupCopy/ \
      -d /deltaCache


    storeBackupReplicationWizard.pl --series homeBackup --masterBackupDir /masterBackup \
      --backupCopyDir /extDisk/backupCopy/ --deltaCacheDir /deltaCache


  4. At this point you can inspect the content of the three replication-related configuration files if you wish. (They are in /masterBackup, /deltaCache and /extDisk/backupCopy with the extension .conf.) For example, check:

    cat /masterBackup/storeBackupBaseTree.conf
    cat /deltaCache/deltaCache.conf

  5. Now you can run your very first backup which will be replicated:
    # storeBackup.pl -s /home -b /masterBackup -S homeBackup --lateLinks 0:homeBackup
    This creates a backup in /masterBackup. If you go there, you can see the delta files plus the command file29 what has to be done to complete the backup. The last parameter (0:homeBackup) makes sure, that there are only hard links to older versions of the same backup series. Because we only want to replicate this one series, it is not possible to have cross links to other series! (This is only necessary if you have multiple backup series in your master backup.)
  6. Next step you can do is to copy the deltas to the place (/deltaCache) where they are kept until you connect the external disk and replicate the deltas. In this step you will also complete the just made backup in the master backup directory. The following command will read the configuration file /masterBackup/storeBackupBaseTree.conf:
    # storeBackupUpdateBackup.pl -b /masterBackup

  7. Now you can finish the replication by completing the backup in the backup copy:
    # storeBackupUpdateBackup.pl -b /extDisk/backupCopy
    Have a look into the backup copy at /extDisk/backupCopy. This is a complete backup now. Also, have a look /deltaCache. The delta was moved to /deltaCache/processedBackups.30

After you set up the environment (which the wizard did in the steps above), simply do the following steps in the future:

Questions not addressed in this Replication Quick Start are covered below.

Heinz-Josef Claes 2014-04-20