Table of Contents:
A universal system for making Backups. It packs all the files/folders that need to be backed up into a zip-file and sends it to a Backupserver over SFTP (not FTPS!). If there are any questions or bugs feel free to open an issue.
The Backupserver will need a folder with the current year-month ('YYYY-mm'). This can be made through Cron or manually.
The files that are needed are:
What the contents of these are and where they are saved is listed below.
This file holds the files and folders that should be backed up by the program. Every file/folder needs to be written on a seperate line with its exact absolute path. You can use a '#' at the first character on a line to make the line a comment and therefore ignored.
You can either create this file in the program rundirectory and leave it alone or let the program do it. It stores the SHA256 of all files that have ever been backed up and the last time the backup ran. If you want to backup a file that hasn't changed, delete the corresponding entry in the json or turn off the SHA-Check in the config (DISCLAIMER: This will backup all files, no matter if new/changed or not).
An example can be found in the Repo. It's pretty self-explanatory.
The name of the zip is in the following pattern: YYYY-mm-dd.zip
. By default (changeable in the config), it contains only files that have changed, in order to keep the size and therefore the tranfer time small. If there already ran an update that day, the user will be asked to give the zip a name. That's made so the previous file will not be overwritten. If the unattended mode is turned on, the program will handle this situation itself.
The zip-file is transfered over SFTP (SSH-FTP). Therefore the Backupserver needs to support SFTP. The Library used is Paramiko.
There currently is only one CLA: The unattended mode. In this mode, which is default on, the program will not take user input (when required) and handle these situations itself so the program can make it's backup. When there already ran updates, it will add the time of the backup to the name of the ZIP.
A list of what should come can be found on Trello. If you like, you're invited to help integrate these features or make new suggestions. For that, please create an Issue here on GitHub.