Skip to main content

Rusticlone

⚠️ Rusticlone v1 (Python) is deprecated and no longer maintained. Rusticlone v2 is a rewrite in Rust with a different architecture: see https://github.com/AlphaJack/rusticlone. The v1 source code lives in the v1 branch.

3-2-1 backups using Rustic and RClone

Motivation

Rustic comes with native support for RClone's built-in Restic server. After trying this feature, I experienced an abysmally low backup speed, much lower than my upload bandwidth: the bottleneck was the synchronous RClone server, as Rustic was waiting for a response before sending other data.

Another side effect of this feature is that Rustic does not create a local repo, meaning I would have to restore directly from the cloud in case of a disaster.

Since I could not run Rustic once for all my profiles (Documents, Pictures, etc.) I came up with a tool to:

  • run Rustic for all my profiles
  • archive them to local Rustic repos
  • upload local repos to a RClone remote

When restoring, this tool would first download a copy of the RClone remote, and then restore from local Rustic repos. By decoupling these operations, I got:

  • three copies of my data, two of which are local and one is remote (3-2-1 backup strategy)
  • the bottlenecks are now the SSD speed (for archive and extract operations) and Internet bandwidth (for upload and download operations)

If it sounds interesting, keep reading!

Installation

Install RClone >= 1.67, Rustic >= 0.10, Python >= 3.11 and then rusticlone:

pip install rusticlone

Configure RClone by adding a remote.

Create your Rustic TOML profiles under "/etc/rustic/" or "$HOME/.config/rustic/" on Linux and MacOS. On Windows, you can put them under "%PROGRAMDATA%/rustic/config" or "%APPDATA%/rustic/config". Configure your profiles to have one or more sources. They should also have a local repository destination, without specifying the RClone remote. You can take inspiration from the profiles in the example folder.

Include variables for the location (and password) of the RClone configuration:

[global.env]
RCLONE_CONFIG = "/home/user/.config/rclone/rclone.conf"
RCLONE_CONFIG_PASS = "XXXXXX"
#escape double quotes inside TOML strings
#RCLONE_PASSWORD_COMMAND = "python -c \"print('YYYYYY')\""

Usage

Backup

Let's assume you want to backup your PC Documents to both an external hard drive (HDD) and Google Drive.

With RClone, you have configured your Google Drive as the gdrive:/ remote.

You have created the "/etc/rustic/Documents.toml" Rustic profile with:

  • source "/home/user/Documents"
  • destination "/mnt/backup/Documents" (assuming your external HDD is mounted on "/mnt")

Launch Rusticlone specifying the RClone remote and the backup command:

rusticlone -r "gdrive:/PC" backup

Great! You just backed up your documents to both "/mnt/backup/Documents" and gdrive:/PC/Documents!

Check the result with the following commands:

#size of all your documents
du -sh "/home/users/Documents"

#contents of local rustic repo 
rustic -P "Documents" repoinfo
tree "/mnt/backup/Documents"

#contents of remote rustic repo
rclone ncdu "gdrive:/PC/Documents"

Restore

From the local Rustic repo

In case you lose your PC, but still have your external HDD, on your new PC you need:

  • rusticlone and dependencies installed
  • your Rustic profiles in place
  • your external HDD mounted

Then, run:

rusticlone extract

Great! You just restored your documents from "/mnt/backup/Documents" to "/home/user/Documents".

From the RClone remote

In case you lose both your PC files and your external HDD, don't worry! You still have your data on the RClone remote.

On your new PC you need:

  • rusticlone and dependencies installed
  • your RClone configuration
  • your Rustic profiles in place
  • a new external HDD mounted

Then, run:

rusticlone -r "gdrive:/PC" restore

Fantastic! You downloaded a copy of your Google Drive backup to the external HDD, and you restored your documents from the HDD to their original location.

Check that everything went well:

#your remote backup files are still there
rclone ncdu "gdrive:/PC/Documents"

#your new external HDD contains a rustic repo
ls -lah "/mnt/backups/Documents"
rustic -P "Documents" repoinfo

#your documents have been restored
du -sh "/home/users/Documents"
ls -lah "/home/users/Documents"

You can now run rusticlone -r "gdrive:/PC" backup as always to keep your data safe.

Individual commands

In alternative to backup and restore, you can also run individual rusticlone commands:

#use rustic from source to local repo
rusticlone archive

#use rclone from local repo to remote
rusticlone -r "gdrive:/PC" upload

#use rclone from remote to local repo
rusticlone -r "gdrive:/PC" download

#use rustic from local repo to source
rusticlone extract

Push notifications

Rusticlone can send a push notification with the operation results using Apprise:

Just pass the Apprise notification URL via the --apprise-url argument or APPRISE_URL environment variable:

rusticlone --apprise-url "tgram:/XXXXXX/YYYYYY/" archive

#alternative
APPRISE_URL="tgram:/XXXXXX/YYYYYY/" rusticlone archive

Parallel processing

You can specify the --parallel argument with any command to process all your profiles at the same time:

rusticlone --parallel -r "gdrive:/PC" backup

Beware that this may fill your RAM if you have many profiles or several GB of data to archive.

Parallel processing is also not (yet) compatible with push notifications.

Exclude profiles

Rustic has a handy feature: you can create additional profiles to store options shared between profiles.

Let's assume this profile is called "common.toml" and contains the following:

[forget]
prune = true
keep-last = 1
keep-daily = 7
keep-weekly = 4
keep-monthly = 3
keep-quarter-yearly = 4
keep-yearly = 1

As it doesn't contain a "[repository]" section, it will not be treated as a standalone profile by Rusticlone.

This "common.toml" profile can be referenced from our documents by adding to "Documents.toml" the following:

[global]
use-profile = ["common"]

# [...]

Custom log file

The default behavior is that, if present, both Rustic and RClone use the log file specified in the Rustic profile configuration.

A custom log file for both Rustic and RClone can be specified with --log-file.

rusticlone --log-file "/var/log/rusticlone.log" archive

If no argument is passed and no log file can be found in Rustic configuration, "rusticlone.log" in the current folder is used.

Automatic system backups

Place your profiles under "/etc/rustic". If you are storing the RClone password inside the profiles, make sure the folder is only readable by root.

Create a Systemd timer unit "/etc/systemd/system/rusticlone.timer" and copy inside the following:

[Unit]
Description=Rusticlone timer

[Timer]
#every day at midnight
OnCalendar=*-*-* 00:00:00

[Install]
WantedBy=timers.target

Create a Systemd service unit "/etc/systemd/system/rusticlone.service" and copy inside the following:

[Unit]
Description=Rusticlone service

[Service]
Type=oneshot
ExecStart=rusticlone --remote "gdrive:/PC" backup

Adjust your --remote as needed.

Apply your changes and enable the timer:

sudo systemctl daemon-reload
sudo systemctl enable --now rusticlone.timer

Testing

You can test Rusticlone with dummy files before using it for your precious data:

make install
make test

You will need bash, coreutils, rclone, and rustic installed to run the test. Before running the test, make sure that you have no important files under "$HOME/.config/rustic".

At the end, you can read a test coverage report with your browser, to see which lines of the source code were run during the test.

Known limitations

  • Rustic does not save ownership and permission for the source location, but only for files and folders inside the source. If you backup "/home/jack" with user "jack" and permission "0700", when you will restore it will have user "root" and permission "0755" (intended rustic behavior)
  • Rustic does not recognize proper Windows paths (bug)
  • Rustic will not archive empty folders (bug)
  • Rustic may introduce breaking changes

Contribute

Feel free to open an Issue to report bugs or request new features.

Pull Requests are welcome, too!

License

Licensed under GPL-3.0 terms.

Not affiliated with Rustic or RClone.

Metadata

Release files for rusticlone 1.6.1.post1

For a detailed explanation of source distributions (sdists) and built distributions (wheels), please see the package formats documentation.

Source distribution (sdist)

Source distribution for rusticlone 1.6.1.post1
File Size Uploaded Provenance Actions
rusticlone-1.6.1.post1.tar.gz 37.6 kB With provenance Details for rusticlone-1.6.1.post1.tar.gz

Built distribution (wheel)

Table of built distributions (wheels) for rusticlone 1.6.1.post1
File Interpreter ABI Platform Actions
rusticlone-1.6.1.post1-py3-none-any.whl Python 3 none any Details for rusticlone-1.6.1.post1-py3-none-any.whl

Total release size: 76.7 kB

Release files / rusticlone-1.6.1.post1.tar.gz

Download URL rusticlone-1.6.1.post1.tar.gz
Size 37.6 kB
Tags Source
SHA-256 checksum
How to use checksums
30f35bab9726f544519ef6cf73b9ec8e62516553c36740e6b7288788211a3581
BLAKE2b-256 checksum
How to use checksums
1b94d8b615c10bbfc7ced9918ef49387de5f8613d046b2cda401a880a2f5e9a9
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
Yes
Uploaded via twine/6.1.0 CPython/3.13.7

Provenance

Provenance describes where a file came from. On PyPI, provenance is shared via attestations, which provide a verifiable record of the build or publishing details. View details, limitations and caveats.

PyPI Publish Attestation

PyPI verified that this artifact, at this checksum, originated from the publisher listed below.

Signed by GitHub Actions, verified by PyPI on Oct 27, 2026.

Transparency log

Release files / rusticlone-1.6.1.post1-py3-none-any.whl

Download URL rusticlone-1.6.1.post1-py3-none-any.whl
Size 39.0 kB
Tags Python 3
SHA-256 checksum
How to use checksums
231bd1e817684fa88f7f7839011b253132596b13c7624cd7de8ba7352a45ec46
BLAKE2b-256 checksum
How to use checksums
95de62a1c80d0bb8e23f4c578a9d5914202372d5d64d4f89ae51821d7770d303
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
Yes
Uploaded via twine/6.1.0 CPython/3.13.7

Provenance

Provenance describes where a file came from. On PyPI, provenance is shared via attestations, which provide a verifiable record of the build or publishing details. View details, limitations and caveats.

PyPI Publish Attestation

PyPI verified that this artifact, at this checksum, originated from the publisher listed below.

Signed by GitHub Actions, verified by PyPI on Oct 27, 2026.

Transparency log

Security for rusticlone 1.6.1.post1

Provenance

Provenance describes where a file came from. On PyPI, provenance is shared via attestations, which provide a verifiable record of the build or publishing details. View details, limitations and caveats.

Full provenance

Both files in this release have been uploaded with provenance metadata.

Select from 2 files

Attestation for rusticlone-1.6.1.post1.tar.gz

PyPI Publish Attestation

PyPI verified that this artifact, at this checksum, originated from the publisher listed below.

Signed by GitHub Actions, verified by PyPI on Oct 27, 2026.

Transparency log

A note on package security

PyPI is a repository for distributing packages, not a service for auditing them. While third-party security researchers and our staff do their best to detect and remove malicious packages, PyPI cannot guarantee the quality, security or suitability of any given package.

To learn more about protecting yourself from malicious actors, visit our package security documentation.

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