/backup_home

A set of programs to backup your $HOME using rsync. See README for a fuller description.

Primary LanguageShellGNU General Public License v3.0GPL-3.0

BACKUP comprises a set of 4 programs.

1. Backup runs rsync to backup $HOME to a removeable drive. It does not
use the --del option so there is no possibility of propogating a 'hole'
into the backup set. It does however do another run of rsync using both
the --dry-run and --del options to record what would have been deleted.
It is cron safe whether the is a MTA installed or not. It does have a
first run mode to install configuration files in $HOME/.config/backup
and create the log and lock dirs at $HOME/log and $HOME/lock.

2. Cleanup. This is just backup but it does use the --del option to
rsync to remove objects in the backup set that have been removed from
$HOME. This should be run manually after reviewing the logs. It has no
first run capability.

3. Decruft. This is to be run using a log file as argument. It filters
out the noise generated by browsers and other programs that actively
create and destroy cache files. The intention is that the user will
mainly only see deletions of personal interest.
Normally it would be run as:
	decruft $HOME/log/dryrun.log
The files to filter out are written in extended grep format in
$HOME/.config/backup/cruft.

4. Bulogrot. This program rotates the logfiles, backup.log and
errors.log located at $HOME/log/. The dryrun.log is not rotated being
created new on every run of backup. No log file of less than 4k bytes
will ever be rotated. $HOME/log/*.log.7 is deleted on each run of
bulogrot if it exists. If backup/cleanup is running on start, bulogrot
waits until it finishes before proceding with the rotation. I cron this
program using:
	@daily /usr/local/bulogrot
in my crontab.
For a machine that is shutdown each evening maybe this would be better:
	@reboot /usr/local/bulogrot

Muliple instances of the backup programs are prevented from running
togther by using a lockfile. However rsync can and does crash regularly
due to deletions of cache files during the progress of the copy. The
backup programs do recover from this situation by examining the ps
table. A suitable message is written to errors.log in that case.
 See also INSTALL.