Rdiff-image.conf

 

NAME

rdiff-image.conf - configuration file for the rdiff-image tools

 

DESCRIPTION

rdiff-image-conf is the configuration file shared by all the rdiff-image tools.

Its format is:

keyword: value

Blank lines, and lines starting with a # are ignored. If the value is a path name, it must be absolute and not contain spaces. If value is a shell glob it will match files who names start with a dot (.).

add: pathname ...
rdiff-image-backup and rdiff-image-cron adds all files in under the directory pathname, but strips the directory name given. Eg, if /etc/dummy contained:

/etc/dummy/etc/x
/etc/dummy/etc/y

the files in /etc/x and /etc/y would appear in the backup. This allows files removed with "secret" to be replaced, so you end up with a working image. This option can appear multiple times.

backup: pathname ...
rdiff-image-backup and rdiff-image-cron are to backup this directory. The backup will not cross file systems. Multiple directories can be backed up. This option is required and can appear many times.

email: email-address[, ...]
rdiff-image-cron sends email to these addresses if the backup or transfer to S3 fails. If not present no email is sent. This option should only appear once.

enable: no
rdiff-image-cron will not run if this option is present and set to no. It will send an email explaining why the backup hasn't happened if the email option is set. This option should appear at most once.

filter: pathname [command...]
rdiff-image-backup and rdiff-image-cron will remove or modify the backed up copy of the file pathname. This line has a file name (or glob) followed by the optional shell filter command. If command is absent the file isn't backed up. Otherwise command is fed the original file on its standard input and whatever it writes to its standard output is put into the backup under the file name. Command is also supplied the input and output file names as the environment variables FILTER_FROM and FILTER_TO respectively. Any file or directory can be removed, but only regular files can be filtered. This option can appear many times.

gpgdir: pathname
rdiff-image-cron will encrypt the secret backup using the public gpg keys listed in the directory pathname. This option can appear at most once. If no gpg keys are supplied the secret backup is discarded. There is one gpg key per file. The file name must be in a format accepted by gpg's --recipient option. This is one way to generate a suitable file:

gpg --armor \
--export-options export-minimal,no-export-attributes \
--output russell-gpg@stuart.id.au \
--export russell-gpg@stuart.id.au

Notice how the arguments to --output and --export are identical. This is one way to guarantee the resulting file name will be acceptable to gpg's --recipient option.

html: template_pathname output_pathname
rdiff-image-cron uses the file template_pathname to generate the html file output_pathname. This option can appear at most once. If not present no HTML files are produced. The template has the following text in it replaced:
{{BACKUP_DATE}}
Replaced with the date the backup took place.
{{BACKUP_TABLE}}
Replaced with a <table> element describing the files produced.
{{BACKUP_TABLE_A}}
As for {{BACKUP_TABLE}}, but the each file name is enclosed with an <a> element pointing to the file in output_pathname.
{{GPG_KEYS}}
Replaced with a <ul> element listing the GPG keys the secret backup is encrypted with.

init.d: script ...
rdiff-image-boot will start these services at boot using its start-service command. They are stated in the order given. No other services or programs are started at boot, nor are dependencies checked so you must explicitly start all services you need, including those systemd would implicitly start because of Requires or Wants. This option can appear multiple times.

mounts: fstype:/mount/point ...
rdiff-image-boot will mount these file systems on startup. Fstype is the type of file system. It must be a pseudo file system, such as tmpfs or sysfs. /mount/point is a mount point within the chroot. The file systems are mounted in the order they appear. Supplying single . prevents any mounts from occurring. This option can appear multiple times.

s3: credentials bucket QTYxAGE[,...]
rdiff-image-cron's S3 backup storage configuration. Credentials has the format AWS-Access-Key:AWS-Access-Secret. The S3 bucket names will be bucket_base and bucket_secret. QTY is the number of backups to keep of a particular age. AGE is a number followed by the unit, which is one of hour, day, week, month, year. An example: 24x1hour,7x1day,4x1week,6xmonth would keep 24 hourly backups, 7 daily backups, 4 weekly backups and 6 monthly backups. A full backup is automatically kept if there is a differential backup that depends on it. This option can appear at most once. If not present no backup is sent to S3.

s3-log: pathname
rdiff-image-cron will write a log of all S3 options to pathname. The log contains lines of the following format (split into two lines for readability):

time,bucket,action,key,size,bytes_up,\\\\
bytes_down,bytes_in_bucket,status,message

where:

time
the time this entry was made, UTC, format: yyyy-mm-ddThh:mm:ss.
bucket
name of the bucket being used.
action
is open for opening a connection, send for sending a backup, and delete for deleting a backup.
key
the key used in S3, as it appeared on the command line.
size
size of the backup being acted upon, in bytes.
bytes_down
bytes received over the TCP stream.
bytes_up
bytes send over the TCP stream.
bytes_in_bucket
total bytes in the bucket after the operation completed.
status
if an error occurred, the status code returned by Amazon.
message
message associated with the status. Commas (,) have been replaced with semicolons (;).

secret: pathname [command...]
rdiff-image-backup and rdiff-image-cron will put this file in the secret image. Apart from the additional step of putting the unmodified file in the secret backup, this is identical to the filter option. This option can appear many times.

work: pathname
rdiff-image-backup and rdiff-image-cron use the directory pathname to store information between runs, and as a scratch area during runs. It must exist. Erasing all files in this directory will cause new full backups to be created. This option must appear exactly once and it must be unique across all rdiff-image.conf files.

wwwdir: pathname
rdiff-image-cron places its output here. The output consists of the backup files, .sha1 checksums of them. This option must appear exactly once.

 

AUTHOR

Russell Stuart <russell-debian@stuart.id.au>

 

SEE ALSO

rdiff-image-backup(1), rdiff-image-boot(1), rdiff-image-cron(1), rdiff-image-get(1), rdiff-image-s3(1), rdiff-image-tarutil(1).

The README.txt that comes with the rdiff-image package.