Skip to main content

Rireki Github Actions Status

CLI backup tool. Schedule backups and keep your precious data safe.

Installation

Install the rireki cli running the following command:

pip install rireki

You need to call rireki backup in order for backups to be performed, and rireki clean to perform clean up. For example, you could use the following crontab configuration to perform backup checks every hour:

0 * * * * rireki backup --timestamps >> /var/log/cron-rireki.log 2>> /var/log/cron-rireki.log
10 7 * * * rireki clean --timestamps >> /var/log/cron-rireki.log 2>> /var/log/cron-rireki.log

Note: Make sure that the crontab can execute the rireki command. 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 the RIREKI_HOME environment variable. Also make sure that the /var/log/cron-rireki.log file exists and is writable by the crontab user.

Usage

Get detailed information running rireki --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 a toml configuration file. It can either be created manually or calling rireki add {project-name}.

Additionally, projects can have the following configurations:

property type description
name string Name of the project.
last_backups_retention integer Number of newest backups to retain on cleanup (defaults to 7).
year_backups_retention `"monthly" "weekly"
ancient_backups_retention `"yearly" "monthly"

Drivers

Files

This 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:

property type description
name "files" The name of the driver.
frequency integer The frequency in minutes at which new backups should be made.
paths string[] Folders or files that will be included in the archive.

Custom

This 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 the RIREKI_BACKUP_PATH env variable.

Once the script has completed, a file named logs.json will also be placed on the path with the standard output and standard error printed by the script.

It needs the following configuration:

property type description
name "custom" The name of the driver.
frequency integer The frequency in minutes at which new backups should be made.
command string Command to call in order to perform backups.
timeout integer Number of seconds where the command will be timed out and the backup will fail.

Stores

Local

This store copies the backups to a folder in the same filesystem.

It needs the following configuration:

property type description
name "local" The name of the store.
path string The path of the folder where the backups will be copied.

An example config file

For example, to backup a project named "Foobar" using the files driver and the local store 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 call rireki add foobar to create this file.

Development

Run tests with pytest and lint your code with flake8 (see the Github Actions configuration for more details).

Download files

Download the file for your platform. If you're not sure which to choose, learn more about installing packages.

Source Distribution

rireki-0.2.0.tar.gz (14.9 kB view details)

Uploaded Source

Built Distribution

If you're not sure about the file name format, learn more about wheel file names.

rireki-0.2.0-py3-none-any.whl (19.5 kB view details)

Uploaded Python 3

File details

Details for the file rireki-0.2.0.tar.gz.

File metadata

  • Download URL: rireki-0.2.0.tar.gz
  • Upload date:
  • Size: 14.9 kB
  • Tags: Source
  • Uploaded using Trusted Publishing? Yes
  • Uploaded via: twine/7.0.0 CPython/3.13.14

File hashes

Hashes for rireki-0.2.0.tar.gz
Algorithm Hash digest
SHA256 9169f6a642ab9d8e2ea7d7c09f6ef1e79c07e29f02774e9cc84bd6827818bdf3
MD5 84ed1df5201fd0f5ca303c080a8ed411
BLAKE2b-256 286b475341f7ea9b95ef611d409cf4e656afc99241a6147e26dcc118f3162e5b

See more details on using hashes here.

Provenance

The following attestation bundles were made for rireki-0.2.0.tar.gz:

Publisher: release.yml on NoelDeMartin/rireki

Attestations: Values shown here reflect the state when the release was signed and may no longer be current.

File details

Details for the file rireki-0.2.0-py3-none-any.whl.

File metadata

  • Download URL: rireki-0.2.0-py3-none-any.whl
  • Upload date:
  • Size: 19.5 kB
  • Tags: Python 3
  • Uploaded using Trusted Publishing? Yes
  • Uploaded via: twine/7.0.0 CPython/3.13.14

File hashes

Hashes for rireki-0.2.0-py3-none-any.whl
Algorithm Hash digest
SHA256 5f170eef45fc85f6f4de80fa1838b7580b582ff0f34378647dbcef0f876d6209
MD5 9dc2fe95a7d23e7820c3c891f55725d0
BLAKE2b-256 f533deb47dd1c0fab83ae6d192fbe5ba33d8ca4bad62fbc9072c354e499c4308

See more details on using hashes here.

Provenance

The following attestation bundles were made for rireki-0.2.0-py3-none-any.whl:

Publisher: release.yml on NoelDeMartin/rireki

Attestations: Values shown here reflect the state when the release was signed and may no longer be current.

Release history Release notifications | RSS feed

This release

0.2.0 This release

2 files

0.1.3

2 files

0.1.2

2 files

0.1.1

2 files

0.1.0

2 files

0.0.4

2 files

0.0.3

2 files

0.0.2

2 files

0.0.1

3 files

Anthropic, PBC Visionary sponsor Bloomberg Visionary sponsor Hudson River Trading Visionary sponsor Meta Visionary sponsor NVIDIA Visionary sponsor Microsoft Sustainability sponsor Depot Continuous Integration AWS Cloud computing and Security Sponsor Datadog Monitoring Fastly CDN Google Download Analytics Sentry Error logging StatusPage Status page