Rdiff-image-cron

 

NAME

rdiff-image-cron - cron backup for rdiff-image

 

SYNOPSIS

rdiff-image-cron [--no-disabled-warning] /path/rdiff-image.conf

 

DESCRIPTION

rdiff-image-cron is the main program in the rdiff-image tools. The rdiff-image tools make regular unattended backups to Amazon's S3 simple, secure and relatively cheap, and makes restoring those backups equally straightforward. rdiff-image-cron's role in this is to do the backup, and copy it to the proper places. As the name implies it is generally run from cron(8).

rdiff-image-cron can optionally generate two backups. One is a image of the backup machine that has all secret information (like passwords) either stripped out or replaced in a way that still leaves the resulting image bootable. The second backup contains the secret information and is encrypted with gpg(1). When overlayed onto the first backup the result is a faithful restoration of the backed up data.

Copies of the latest backup files are kept on a local file system. Previous backups are automatically purged from the local copy. rdiff-image-cron produces SHA1 checksums for all backup files, and optionally will write out a HTML status page describing the state of the backup, thus making is easier to download backup files over HTTP.

The backup has one of two formats: an occasional full tar backup and a set of differences between the last full backup and now. The differences file is usually small, so once you download a copy of the full version getting a copy of the latest differences file is fast.

Any combination of hourly, daily, weekly and monthly backups can be automatically maintained by rdiff-image-cron on Amazon's S3 service. If the differences backup grows linearly the algorithm used by rdiff-image-cron to determine when to produce the next full backup is optimal in the sense of keeping S3's charges to a minimum.

 

OPTIONS

--no-disabled-warning
Exit silently and successfully if the enable option isn't set to yes in the supplied /path/rdiff-image.conf.

 

CONFIGURATION

rdiff-image-cron reads all its configuration information from the configuration file supplied in the /path/rdiff-image.conf argument. The options it accepts are described fully in rdiff-image.conf(5). Briefly, those options are:
add
Additional files to add to the backup so it is bootable.
backup
The directories to backup.
email
Who to send email to if the backup doesn't happen.
enable
If set to no backups are disabled.
filter
files to exclude from the backup, or alternatively files to modify in the backed up copy.
gpgdir
gpg(1) Keys used to encrypt the secret backup.
html
how to generate the HTML index page.
s3
what to store on Amazon's S3.
s3-log
Where to place a log of what happened on S3. The log allows auditing of S3 charges.
secret
Files to move to the secret backup.
work
Where to store state information between runs.
wwwdir
Where to place the local copy of the backup files.

 

OUTPUTS

Only one instance of rdiff-image-cron for a given /path/rdiff-image.conf can run at one time. If you start a new backup while an old one is in progress it will abort. rdiff-image-cron produces the following outputs:
Local copy of the backup files
The wwwdir option says what directory these files are stored in. Previous versions of these files are automatically purged from wwwdir immediately after the new ones have been put in place. Wwwdir may contain other files, but they must not have names that look like those below. The files put in wwwdir are:
yyyymmdd-hhmmss__base.tar.gz
The most recent full, non-secret backup which was made at date-time yyyymmdd-hhmmss.
yyyymmdd-hhmmss__base.tar.gz.sha1
SHA1 checksum for yyyymmdd-hhmmss__base.tar.gz, produced by sha1sum(1).
yyyymmdd-hhmmss_YYYYMMDD-HHMMSS_base.rdiff.gz
The differences between the latest non-secret backup made at date-time yyyymmdd-hhmmss and the latest full backup, which was made at date-time YYYYMMDD-HHMMSS. This will not be present if this was a full backup.
yyyymmdd-hhmmss_YYYYMMDD-HHMMSS_base.rdiff.gz.sha1
SHA1 checksum for yyyymmdd-hhmmss_YYYYMMDD-HHMMSS_base.rdiff.gz, produced by sha1sum(1).
yyyymmdd-hhmmss__secret.tar.gz.gpg
The most recent full, non-secret backup which was made at date-time yyyymmdd-hhmmss.
yyyymmdd-hhmmss__secret.tar.gz.gpg.sha1
SHA1 checksum for yyyymmdd-hhmmss__secret.tar.gz.gpg, produced by sha1sum(1).
yyyymmdd-hhmmss_YYYYMMDD-HHMMSS_secret.rdiff.gz.gpg
The differences between the latest non-secret backup made at date-time yyyymmdd-hhmmss and the latest full backup, which was made at date-time YYYYMMDD-HHMMSS. This will not be present if this was a full backup.
yyyymmdd-hhmmss_YYYYMMDD-HHMMSS_secret.rdiff.gz.gpg.sha1
SHA1 checksum for yyyymmdd-hhmmss_YYYYMMDD-HHMMSS_secret.rdiff.gz.gpg, produced by sha1sum(1).

HTML index page
If the html option so directs, a HTML index page describing the latest backup files produced is created.
Failure Email
If the backup does not complete for some reason and the email option is set, an email will be sent explaining what happened.
S3 backup
If the s3 option is set, the new backups produced will be sent to S3 and backups no longer required (as determined by the backup cycle specification) will be automatically purged. Rdiff-image-cron assumes it has sole control of its Amazon S3 bucket. If it detects others have modified it, it will print an error message.
S3 Log
If the s3-log option is set a csv log of all chargeable S3 activities has the current run appended to it.

 

BUGS

cpio(1) is used to do the backups due to a deficiency in tar(1). See:
http://lists.gnu.org/archive/html/bug-tar/2009-03/msg00000.html
Cpio supports ustar (see tar(7)) only, and thus long path names can confuse it.

 

AUTHOR

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

 

SEE ALSO

Use rdiff-image-get(1) to restore the backups made by rdiff-image-cron.

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

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