[ previous ] [ Contents ] [ 1 ] [ 2 ] [ 3 ] [ next ]


Backup Manager 0.7.7 User Guide
Chapter 3 - Using Backup Manager


Now that you know in details how to write your configuration files, let's see how to use Backup Manager.


3.1 Command line


3.1.1 Restrictions

In version 0.7.7, Backup Manager can only be used by root, as it has be designed as a systemwide tool.

     $ backup-manager
     backup-manager must be run as root.

If you want to launch it from the command line, you first have to use the root account.

     $ su
     Password:
     # backup-manager -h
     /usr/sbin/backup-manager [options]
     
     Output:
     --help|-h           : Print this short help message.
     --verbose|-v        : Print what happens on STDOUT.
     --no-warnings       : Disable warnings.
     
     Single actions:
     --upload|-u         : Just upload the files of the day.
     --burn|-b           : Just burn the files of the day.
     --md5check|-m       : Just test the md5 sums.
     --purge|-p          : Just purge old archives.
     
     Behaviour:
     --conffile|-c file  : Choose an alternate config file.
     --force|-f          : Force overwrite of existing archives.
     
     Unwanted actions:
     --no-upload         : Disable the upload process.
     --no-burn           : Disable the burning process.
     --no-purge          : Disable the purge process.
     ouranos:/home/sukria#

As you can see in the example above, using the -h switch (or --help) gives a short help message and prints all supported command switches. We will cover in this section each of them.


3.1.2 Options

The following switches can be used for altering Backup Manager's behaviour.


3.1.2.1 --version

Prints on stdout the Backup Manager version installed on the system and exit.

Example:

     # backup-manager --version
     Backup Manager 0.6

3.1.2.2 --verbose or -v

Using this switch will enabled the verbose mode. All actions are reported on stdout.

Example:

     # backup-manager -v
     Getting lock for backup-manager 10605 with /etc/backup-manager.conf: ok
     Cleaning /var/archives
     Entering directory /var/archives/lost+found.
     [...]

3.1.2.3 --no-warnings

When a non-critical problem occurs (an error occured but the backup process can follow) Backup Manager will print a warning message (and will log it if the logger is enabled). If you don't want to see warning messages, you can append this switch on the command line.


3.1.2.4 --conffile or -c

Backup Manager relies on configuration files, by default, the file /etc/backup-manager.conf is used but you can choose to run it with a different one. This is done by using the following syntax :

     # backup-manager -c <FILE>

Note that Backup Manager is designed to work properly when launched in parallel mode with different configuration files, but it will refuse to run twice at the same time with the same configuration file. You can then safely do something like that:

     # backup-manager -c /etc/backup-manager/backup-nfs.conf &
     # backup-manager -c /etc/backup-manager/backup-homedirs.conf &
     # backup-manager -c /etc/backup-manager/backup-rsync-filer.conf

3.1.2.5 --force

When building an archive, Backup Manager looks if the archive already exists in the repository, if so, a warning is sent saying that the archive exists. If you want to bypass this warning and overwrite archives, use this switch.


3.1.2.6 --upload or -u

If you have made a configuration file that enables the uploading system, you can ask Backup Manager to perform the uploading session instead of the whole process with this switch.


3.1.2.7 --burn or -b [<DATE>]

If you have made a configuration file that enables the burning system, you can ask Backup Manager to perform the burning session instead of the whole process with this switch.

You can also ask Backup Manager to burn only archives of a given date with providing a timestamp after the --burn switch.

Example:

Burning all the archives made on March, 12nd 2006:

     # backup-manager --bnurn 20060312

3.1.2.8 --md5check or -m

If you have made a configuration file that enables the MD5 checks on burnt media, you can ask Backup Manager to perform the MD5 checks instead of the whole process with this switch.


3.1.2.9 --purge or -p

This switch will as Backup Manager to just perform the archive repository purge: removing any depreacted archives (according to BM_ARCHIVE_TTL.


3.1.2.10 --no-upload or -p

Use this switch if you have a configuration file that enables the uploading system and want to run Backup Manager without it.


3.1.2.11 --no-burn

Use this switch if you have a configuration file that enables the burning system and want to run Backup Manager without it.


3.1.2.12 --no-purge or -p

Use this switch if you want to disable the purging phase. This can be useful if you like to implement another kind of purging system, with a post-command hook for instance.


3.2 CRON integration

There is a global idea behind Backup Manager's design: "You won't do it if you have to think about it". This is specifically true for backup concerns and it is strongly adviced to automate your backup process with a tasks scheduler like CRON.

Setting up a Backup Manager job in cron is pretty easy, you just have to write a shell script under the appropriate CRON sub-directory that will call backup-manager. The best sub-directory to choose is /etc/cron.daily as Backup Manager handles daily archives.

Here is an example of a CRON script:

     cat > /etc/cron.daily/backup-manager
     #!/bin/sh
     
     /usr/sbin/backup-manager

If you want to be notified by mail if a problem occurs during the backup session, just make sure you receive mails coming from CRON. When the verbose mode is off, only warnings and errors are printed on stdout, so you will receive a mail from the Backup Manager CRON job only in case of unexpected effects.

On the other hand, if you like to receive daily mails from the job, even if everything went well, just append the --verbose switch like that :

     cat > /etc/cron.daily/backup-manager
     #!/bin/sh
     
     /usr/sbin/backup-manager --verbose

[ previous ] [ Contents ] [ 1 ] [ 2 ] [ 3 ] [ next ]


Backup Manager 0.7.7 User Guide

1.7 - 14 Apr, 2008

Alexis Sukrieh