Package: rireki
RirekiCLI backup tool. Schedule backups and keep your precious data safe.InstallationInstall the rireki cli running the following command:pipinstallrirekiYou need to callrireki backupin order for backups to be performed. For example, you could use the following crontab configuration to perform backup checks every hour (remember to create the/var/log/rirekidirectory as well):0****rirekibackup>>/var/log/rireki/cron.log2>>/var/log/rireki/cron-error.logNote:Make sure that the crontab can execute therirekicommand. That will depend on how you installed the package and which crontab you configure. Also keep in mind that by default the command will read the projects from the home folder of the current user. This can be overriden by setting theRIREKI_HOMEenvironment variable.UsageGet detailed information runningrireki --help.There are three core concepts on how rireki manages backups:Projects:A project is something you want to back up. For example a website database or a collection of files.Drivers:A driver is the program used to create the backup files. For example zipping up a folder or dumping a database.Stores:A store is the program used to save the backup files created with a driver. For example copying them to a local folder or uploading them to a 3rd party service.In order to install a new project to backup, a configuration file can be added to~/.rireki/projects/{project-name}.conf. This will be atomlconfiguration file. It can either be created manually or callingrireki add {project-name}.DriversFilesThis driver creates an archive with files copied from the local filesystem. The archive will be a zip file if possible or a tar file.It needs the following configuration:propertytypedescriptionname"files"The name of the driver.frequencyintegerThe frequency in seconds at which new backups should be made.pathsstring[]Folders or files that will be included in the archive.CustomThis driver can be used if backing up a project is not supported by any of the other drivers. It consists of a custom script that will be called to generate the backup artifacts. The backup files should be placed on a path indicated by theRIREKI_BACKUP_PATHenv variable.Once the script has completed, a file namedlogs.jsonwill also be placed on the path with the standard output and standard error printed by the script.It needs the following configuration:propertytypedescriptionname"custom"The name of the driver.frequencyintegerThe frequency in seconds at which new backups should be made.commandstringCommand to call in order to perform backups.timeoutintegerNumber of seconds where the command will be timed out and the backup will fail.StoresLocalThis store copies the backups to a folder in the same filesystem.It needs the following configuration:propertytypedescriptionname"local"The name of the store.pathstringThe path of the folder where the backups will be copied.Amazon Web ServicesThis store uploads the backups to an AWS S3 instance.It needs the following configuration:propertytypedescriptionname"aws"The name of the store.regionstringThe region where the S3 instance is located.access_keystringThe access key ID.access_secretstringThe secret access key.bucketstringThe name of the bucket where the files will be uploaded.pathstringThe path within the bucket where the files will be placed.Digital OceanThis store uploads the backups to a Digital Ocean Spaces instance.It uses the same configuration as the AWS store, with the only exception that the name is"digital-ocean"instead.An example config fileFor example, to backup a project named "Foobar" using thefilesdriver and thelocalstore we would create the following file at~/.rireki/projects/foobar.conf:name="foobar"[driver]name="files"paths=["/path/to/data/folder"]frequency=1440[store]name="local"path="/path/to/backups/folder"As mentioned before, you could callrireki add foobarto create this file.DevelopmentRun tests withpytestand lint your code withflake8(see theGithub Actions configurationfor more details).