I am preparing a backup system for my personal home server that is running openSUSE 13.2.
I would like to backup:
- system configuration (I guess /etc should be enough for this) so that I can reconfigure the server if I need to reinstall it or install a newer version on it
- owncloud installation
- web server (apache)
- version control system (repos + config; svn & git)
- and potentially some other parts
My plan is to prepare a python script that would:
- be called from cron periodically (for example once per hour)
- prepare daily snapshots from file system
- prepare weekly snapshots from daily snapshots
- prepare monthly snapshots from weekly snapshots
Just to clarify … I want to periodically call the script from cron to prevent the situation where a backup is not created if the computer is not running at the exact time when a backup is configured to be executed.
I would need help with the “backup” part, the script part should be easy
I also have BTRFS as the file system on the server which also has some useful features for backup purposes.
My idea is to maybe have a snapshot as the “working copy” and then make a “complete” for one day of the week and “diffs” for the other six days of the week. The weekly snapshots could even serve for the purpose of a “complete” daily snapshot. From my research up to now it appears that rsync on its own or in combination with BTRFS would be the best choice, but there is so many different tutorials that mostly do solve my problem but not completely and there is usually not enough good justification why to do it in the presented way…
So I am looking for:
a) general idea how to do the backup “architecture”
b) command line options to do the actual backup