[ previous ] [ Contents ] [ 1 ] [ 2 ] [ 3 ] [ next ]
Now that you know in details how to write your configuration files, let's see how to use Backup Manager.
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.
The following switches can be used for altering Backup Manager's behaviour.
Prints on stdout the Backup Manager version installed on the system and exit.
Example:
# backup-manager --version Backup Manager 0.6
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. [...]
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.
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
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.
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.
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
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.
This switch will as Backup Manager to just perform the archive repository purge: removing any depreacted archives (according to BM_ARCHIVE_TTL.
Use this switch if you have a configuration file that enables the uploading system and want to run Backup Manager without it.
Use this switch if you have a configuration file that enables the burning system and want to run Backup Manager without it.
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.
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