A very simple rsnapshot wrapper to help server admins. Please note this script comes with NO WARRANTY TO THE EXTENT PERMITTED BY LAW.
backup.py uses a very simple config file to do backups (please note that ssh key login without password is assumed to be possible for any remote targets):
backups:
my-random-backup:
source: myuser@my-remote-server.com:/srv/
target: /home/myuser/mybackup-folder/
interval: 1d
snapshots: 7
Place this config in the working directory you will run backup.py in
(not necessarily where you copy your snapshots from/to) in a file named
backup-py-config.yml
- or alternatively just use the -c
option to
specify its location.
Then, simply run backup.py
regularly and at each run it will check if
the last snapshot is older than the given interval and add a new one.
We recommend you use anacron for this.
Important: make sure not to schedule runs in too short intervals to
avoid the script being run twice before the old invocation has finished
running.
backup.py
is free software, check the license.