Skip to main content

A simple, declarative backup tool.

Project description

suisave

Static Badge Static Badge

A simple, declarative backup tool. An automated frontend for rsync.

[!WARNING] This project was completely rewritten on v. 0.3.0-alpha with many breaking changes. To recompile the previous version, refer to the alternative branches.

suisave automates the process of making backups of your files to external storage, in a declarative way. That is, given a static configuration file comet.toml, suisave will parse it and make all of your backups to their corresponding devices exactly how you wrote it. Being just a set of files, or your whole PC.

This project started because I am lazy enough to copy and paste my files manually, or to copy and paste the same command multiple times. Therefore I decided to make an overkill CLI to perform one simple task.

Why choose suisave?

If you...

  • are in the niche of being constantly tired of having to think about managing your backups properly into physical, external devices, adding redundancy, and copying and pasting multiple times. Then suisave is for you.

  • like to only execute one single command to execute all of your backups from a single, static configuration file.

Then suisave is for you. Additionally, suisave is simple enough that even my mom uses it.

[!NOTE] The name suisave. I am obsessed with VTubers, and put references everywhere I can. This is a reference to my kamioshi Hoshimachi Suisei.

Support and Requirements

Supported Operating Systems

  • Linux (any with pip)
  • Arch Linux based (through the AUR)

[!NOTE] The library contains one specific subprocess call to lsblk in interactive mode that will break in MacOS. There are future plans to support it though.

No Windows support, and no current plans to do so.

Installation

From PyPI (pip)

Simply enter your virtual environment and run

pip install suisave

Local installation from source (pip)

In case new features are not avaiable on the PyPI build, you can directly clone and install the package into your virtual environment.

git clone https://github.com/leogabac/suisave.git
cd suisave
pip install .

Arch-Based Linux Distributions (system-wide)

Use any AUR helper like paru or yay.

paru -S suisave

Post Install

Run the following command:

suidesk

This will create a suisave.desktop under ~/.local/share/applications/ for you to find with your preferred application launcher.

Configuration and Usage

The backups are configured through a .toml file under ~/.config/suisave/comet.toml. See the example template.

In summary, suisave requires two things

  1. A table of drives that you can use, each identified by their UUID
  2. Rsync jobs to do

once that is set up, simply run

suisave run

Registering drives

Drives are registered by a LABEL and their UUID. You can manually get them via lsblk, and either edit the config file or run

suisave config drive --add LABEL UUID

A better way is to connect and mount the desired drives to add and run the --interactive flag.

suisave config drive --interactive

[!NOTE] To remove a drive, run

suisave config drive --remove LABEL # the registered label

No need for UUID here. Or simply do it via the --interactive flag.

Jobs

Any rsync job requires

  1. A name
  2. A target_base directory (relative to drive mountpoint)
  3. A list of sources
  4. A list of drives
  5. A list of flags

Then rsync runs

rsync flags /path/to/source /mountpoint/target_base/relative/path/to/source

There are two types of jobs: backups and custom.

Backup Jobs:

Backup jobs are a subset of the custom jobs where some defaults are assumed

  1. The target base is by default backups/hostname-machine-id. The main idea is to have an identical copy of your home directory with redundancy backed up. This way you can have multiple computer backed up to the same drive.

These options can be changed via the tg_base and pc_name in the [global] table

  1. The rsync flags are taken from the [global] table.

Custom Jobs:

These are general and require you to provide all fields. They exist just in case you need more flexibility.

Project details


Download files

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

Source Distribution

suisave-0.3.1.tar.gz (18.1 kB view details)

Uploaded Source

Built Distribution

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

suisave-0.3.1-py3-none-any.whl (18.5 kB view details)

Uploaded Python 3

File details

Details for the file suisave-0.3.1.tar.gz.

File metadata

  • Download URL: suisave-0.3.1.tar.gz
  • Upload date:
  • Size: 18.1 kB
  • Tags: Source
  • Uploaded using Trusted Publishing? No
  • Uploaded via: twine/6.2.0 CPython/3.14.3

File hashes

Hashes for suisave-0.3.1.tar.gz
Algorithm Hash digest
SHA256 da2e4f2c4a131d4c4157b1c432d1882721f976c6f9bc8bc5418d774d3e175acd
MD5 dfa95fe4200fc36dbf5a4808a55eeb95
BLAKE2b-256 8f66bcd30636644f446bcdd57da822e6d673f9670b65063cac60612896c7526c

See more details on using hashes here.

File details

Details for the file suisave-0.3.1-py3-none-any.whl.

File metadata

  • Download URL: suisave-0.3.1-py3-none-any.whl
  • Upload date:
  • Size: 18.5 kB
  • Tags: Python 3
  • Uploaded using Trusted Publishing? No
  • Uploaded via: twine/6.2.0 CPython/3.14.3

File hashes

Hashes for suisave-0.3.1-py3-none-any.whl
Algorithm Hash digest
SHA256 e053c2f26e60415e1a6f1a5b9699e00052a9f25e7c84a6c0fc5b143d4faf9c1d
MD5 ffc8ace2703956a416f29d0be0579f80
BLAKE2b-256 8581e915ddb59125b4d62805988b63bfe3cacaa1602152307d17c438afe0c52a

See more details on using hashes here.

Supported by

AWS Cloud computing and Security Sponsor Datadog Monitoring Depot Continuous Integration Fastly CDN Google Download Analytics Pingdom Monitoring Sentry Error logging StatusPage Status page