Rattail can invoke the
rsync command to copy relevant portions of
the file system to another location.
The main disadvantage to rsync is that the “backup” is competely replaced every time the command runs. So you always have just one “most recent” backup.
Doing so is almost certainly better than nothing, but Borg is really a superior solution in every way it seems. You are encouraged to use that instead.
You can enable the rsync feature like so:
rsync = true
The rsync feature is disabled by default but you can make that explicit:
rsync = false
By default Rattail will run
rsync before it runs
but you can reverse that sequence if you need to:
rsync.last = true
Rattail only supports a single “destination” for rsync. This can be either a “local” path, e.g. a backup drive mounted to the main filesystem, or can be a remote path accessible via SSH.
Here is what a “local” path would look like, e.g. if we want rsync to
write files in the
rsync.remote_prefix = /mnt/mydrive/server-backup
And if we instead wanted rsync to write to the
folder on the
otherserver remote machine:
rsync.remote_host = otherserver
rsync.remote_prefix = /srv/server-backup
Files to Backup¶
Rattail will by default only include certain folders in the rsync run,
and avoid things like the
/tmp folder etc. You can override this
as needed, but here is the default list of what it includes:
Rattail will also exclude some things by default; again override as
needed but here is that default list. Note that the convention used
is to specify trailing slash for folders, and not for files. These
values are passed directly to the
rsync command so ultimately it
will be interpreting them:
Note that it is only necessary to exclude things which fall “within”
folders which are included ..e.g. no reason to explicitly exclude
/tmp folder since it wasn’t included. But since
included we must exclude
/var/cache or else it would be backed up
along with the rest.