hdup.conf − the hdup configuration file |
The configuration file syntax of hdup is borrowed from SaMBa (which is more commonly known as an ini-style config file). A ’#’ as the first character on a line is the start of a comment. Blank lines are skipped. Multiple entries on a line must separated by commas: ",". Some options can be turned on and off. These are binary options. All binary option default to ’off’. They are turned on by ’yes’,’on’ or ’true’ and are turned off with ’no’, ’off’ or ’false’. The [global] section is required to be the first section in the configuration files. Options specified under [global] are also used in [host] sections. They can overridden when they are also specified under that [host] statement. This works for all options. Further to this, one [host] statement can inherit from another [host] statement. Config entries may be given multiple times, in that case the latest one is taken as the final choice. It is further best described by an example: |
[global] |
The [global] section is required. The keywords specified under it are used for each host (globally). All keywords specified under [global] are inherited by the other hosts. Ie. if you specify ’compression = gzip’ under global, all hosts who do not redefine ’compression’ will use ’gzip’. |
[host-name] |
This is a host statement. For every host you want to back up there should be a host statement. This is also true when you are restoring an archive. Host statements can inherit from other host statements. Any keywords initialised for the original host, will append to, or overwrite, the current keywords. There is a maximum of 255 different hosts in 1 hdup configuration file. Be aware that archive dir must be specified in the configuration file, dir is only needed when performing backups. When restoring it is not needed. |
Keywords |
The following keywords are supported: algorithm, allow remote, always backup, archive dir, chunk size, compression,compression level, date dir, exclude, find, force, free, group, gpg, include, inherit, key, log, mcrypt, no history, one filesystem, overwrite, postrun, prerun, proto, proto, remote hdup, remote hdup option skip, sparse, spec, tar, tar option and user, |
algorithm |
Optional. What algorithm should hdup use when encrypting an archive. If this is not specified the archive will not be encrypted. Both ’algorithm’ and ’key’ must be present. For gpg encryption use gpg here. |
allow remote |
Optional, binary option. If ’on’ remote archives are allowed to be uploaded from this host, otherwise they are denied. |
always backup |
Optional, binary option. When ’on’ hdup will always perform a backup. Normally when an incfile is not found the backup is aborted. What this option does is that if the backup scheme is daily and no weekly incfile is found, hdup performs a weekly backup. If hdup discovers no monthly incfile when doing a weekly it performs a monthly dump. |
archive dir |
Mandatory. Specify what directory hdup should use to store the archives and the (incremental) dump information. |
chunk size |
Optional. Give the size of the chunks hdup should create when splitting up an archive. Size can be given with the suffix ’k’, ’K’ or ’m’, ’M’. Chunks of the archive get the suffix ’__split__XX’, where XX is a two letter sequence starting by ’aa’ and ending at ’zz’. To split up archive in CD sized chunks, chunk size = 640m could be used. |
compression |
Optional. Specify the compression hdup should use. This can be bzip, gzip, lzop or none. Defaults to gzip. Some explanation on the difference might be appropiate here. bzip (which uses bzip2) is slow but compresses the best, gzip is faster but offers less compression. lzop is the fastest of them all while offering very good compression. none is of course the fastest. |
compression level |
Optional. Specify the compression level, it’s an integer between 1 and 9 (inclusive), where 1 equals, fast operation, lousy compression and 9 means best compression, but slow. When omitted it defaults to 6. Defaults to 6, which for all compression algorithms is the standard default. |
date spec |
Optional. The following formats are supported: |
dir |
Mandatory. Specify which directories or files should be backed up. You can also specify a single file, like /usr/src/linux/.config. |
There can be up to 20 different directories specified. There can only be 1 dir statement per host. |
exclude |
Optional. Specify a list with a globbing expressions that should be used to determine which files should not be backed up. This uses the --exclude=PATTERN feature from tar, see tar(1). Note that you cannot use a regular expression. |
find |
Optional. The path to find. Defaults to the value of the configure script. This find must support the command line syntax of GNU find. |
||
force |
Optional, binary option. When ’on’ a restore to / will be allowed. |
||
free |
Optional. With free you can specify how much free space must be available on a partition. If this free space requirement is not met, hdup will not perform the backup. Takes an optional size modifier: ’k’, ’m’ or ’G’. |
||
gpg |
Optional. The path to gpg. Defaults to the value of the configure script. |
||
group |
Optional. Specify the group under which the archives must be stored. Defaults to whatever group ’user’ belongs to. |
include |
Optional. Specify a list with globbing expressions that should be used to determine which files should be backed up. Hdup uses GNU find(1) to generate the filelist which is then given to tar. Included files take precedence on exclude files. If no files are found all directories specified are backed up. If files are found only the included files are put in the archive. |
inherit |
Optional. Specify a list of hosts to inherit from. All keywords specified will either overwrite (for single items) or append (for lists) keywords for the current host. This allows creating specific host configurations out of common parts. |
key |
Optional. Which file should be used as the encryption key. Both ’algorithm’ and ’key’ must be present. In the case where algorithm is gpg the user ID of the key must be specified here. |
||
log |
Optional, binary option. When ’on’ hdup will also log to syslog. All message will be logged under LOG_DAEMON with priority LOG_NOTICE. All errors are logged in the following format: |
FAILURE, <hostname>, <error condition> Succes is reported as: If the backup is send to a remote system, <archive size> equals "remote". If the operation is restore, then <archive size> equals "restore". |
mcrypt |
Optional. The path to mcrypt. Defaults to the value of the configure script. |
no history |
Optional, binary option. When ’on’ hdup will store each archive in a directory called ’static’ thereby not keeping any history of the archives. WARNING: this option is dangerous to use. When a backup fails and you did not copy the archives to some safe place you are left with no backups at all! A postrun script is provided in the examples directory of the hdup source, which copies the archives to a safe place. It is best to NOT use this option unless you know what you are doing. Restoring such an archive can be accomplished by using the word ’static’ as the restore date. |
one filesystem |
Optional, binary option. When ’on’ hdup will stay in the local file system for each directory specified (with ’dir’) when creating a backup. |
overwrite |
Optional, binary option. When ’on’ old archives are overwritten. |
postrun |
Optional. Specify a command or script that be should run
after hdup is finished with the backup. The
following variables can be used as arguments: Note: If the postrun script executes with errors the backup is not aborted. |
prerun |
Optional. Specify a command or script that should run before hdup begins with the actual backup. The following variables can be used as arguments: |
%h expands to the current host. Note: If the prerun script executes with errors the backup IS aborted. |
proto |
Optional. Specify the path of the program to use when transferring an archive to a remote host. Known to work is ssh. Defaults to the value of the configure script. |
These programs must be able to be used as a filter and support the user@remotehost syntax. Note: Be aware that this value must also be defined in the remote hdup which is receiving the backup, although it is not used there. If you don’t want to set it to ’ssh’ you can use ’/dev/null’ or any other path. |
proto option |
Optional. Specify options that are given to the proto command in hdup. E.g. proto option = -i /home/user/.ssh/identity -oProtocol=2. |
remote hdup |
Optional. If the @user@remotehost syntax is used this keyword specifies the location of the remote hdup. |
remote hdup option |
Optional. If the @user@remotehost syntax is used this keyword specifies the options (like the location of the config file) that should be used by the remote hdup. |
skip |
Optional, binary option. When ’on’ the backup directory is automaticly put in the exclude list and thus not backed up. |
|
sparse |
Optional, binary option. When ’on’ hdup will use tar’s --sparse feature when backing up files. |
|
tar |
Optional. The path to tar. Defaults to the value of the configure script. This tar must support the command line syntax of GNU tar. |
tar option |
Optional. Specify some extra options to the tar executed by hdup. These options are given the tar and untar commands. No extra checking is done by hdup on these options. |
user |
Optional. Specify the user under which the archives must be stored. Defaults to operator. |
Written by Miek Gieben. Wouter van Gils helped a lot with testing pre-release versions. User feedback is appreciated. |
Report bugs to <hdup-user@frodo.miek.nl>. |
Copyright (C) 2001-2003 Miek Gieben. This is free software. There is NO warrenty; not even for MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. |
hdup(1). |