This page describes how bcollect is used. It does not describe who uses bcollect, so if you're looking for that you will be disappointed with the contents of this page.

The configuration file

bcollect is controlled through the configuration file /etc/bcollect.conf which contains settings of all backups as well as general settings. An example of a typical configuration file would look like this:

Begin Defaults
        Interval "daily" 10
End Defaults

# Define a backup
Begin Backup
        Name            "penrose"
        Source          "85.214.21.174:/"
        Destination     "/home/backup/penrose"
        Summary         true
        Exclude         "/proc/*"
        Exclude         "/usr/pkg/emul/linux/proc/*"
        Exclude         "/emul/linux/proc/*"
        Exclude         "/kern/*"
        Exclude         "/tmp/*"
        Exclude         "/mnt/*"
        PreExec         "echo Before backup | logger"
        PostExec        "echo Before backup | logger"
End Backup

# Define another backup
Begin Backup
        Name            "thebsh"
        Source          "193.219.115.146:/"
        Destination     "/home/backup/thebsh"
        Summary         true
        Exclude         "/proc/*"
        Exclude         "/usr/pkg/emul/linux/proc/*"
        Exclude         "/emul/linux/proc/*"
        Exclude         "/kern/*"
        Exclude         "/tmp/*"
        Exclude         "/mnt/*"
        PreExec         "echo Before backup | logger"
        PostExec        "echo Before backup | logger"
        # This backup is not executed on bcollect -a
        ManualOnly      true
End Backup

The Defaults section may currently contain only intervals for backups. These intervals always follow the scheme:

Interval name number-of-copies-to-keep

The section Backup may be repeated as many times as required. Each of the instances describes a backup to be configured. Various options may be set here:

Invoking bcollect

bcollect accepts a small numbers of command line parameters. For a typical backup run, a command line such as

% bcollect daily -a

is sufficient. This will run all backups which have not been disabled explicitly (through the ManualOnly flag) and retain the number of backups specified in the interval daily. It should be noted that bcollect is aware of backups which are already being executed and refuses to start them again while another backup process is still running. Instead, an error message is produced:

% bcollect daily thebsh
thebsh: Backup already in progress
% 

When executing the backup, bcollect creates a directory named backupname-intevalname-yyyy-mm-dd_HHhSS in the target directory, e.g. thebsh-daily-2010-03-29_18h16. The backup is being stored into that directory.

bcollect accepts the following parameters:

% bcollect [-c configfile] [-p] |-a

Parameter Effect
-c configfile Use an alternative configuration file in place of /etc/bcollect.conf
-p Ressource controlled parallel execution of multiple backups (not implemented yet)
-a Execute all backups instead of expecting single backups as parameters
interval The interval to be executed, indicating how many backups to keep around
backup The name of the backup to be executed, typically the host name, as indicated in bcollect.conf as Name