resticbackups3 (rbs3)
A command-line tool that turns restic and S3-compatible storage (Cloudflare R2 first) into "init once, then back up from cron":
rbs3 init <profile>
rbs3 backup <profile> --mail
rbs3 cronjob <profile> "0 4 * * *" --mail --silent
Status: early development. rbs3 init checks and saves a profile; backups come next.
Create a profile
rbs3 init <profile> --env-file creds.env --config settings.toml
Credentials can come from an env file (--env-file), this shell's environment (--env-var),
flags (--restic-password=…) or prompts. They combine, with flags first, then the env file,
then the environment, and anything still missing is asked for. Prefer the env file or the prompts:
secrets given as flags end up in shell history.
| Key | Required |
|---|---|
RESTIC_REPOSITORY |
yes, s3:https://<account>.r2.cloudflarestorage.com/<bucket>[/<prefix>] |
AWS_ACCESS_KEY_ID, AWS_SECRET_ACCESS_KEY, RESTIC_PASSWORD |
yes |
AWS_DEFAULT_REGION |
no, default auto |
SMTP_SERVER |
no; empty means no email reports |
SMTP_PORT, SMTP_SECURITY (starttls/ssl) |
defaults 587 / starttls |
SMTP_USER, SMTP_PASSWORD, MAIL_TO |
when SMTP_SERVER is set |
MAIL_FROM |
no, default SMTP_USER |
Before saving, init checks everything it can and prints ✔ or ✖ with a reason for each:
- restic is installed and 0.16 or newer (if not, it prints the install command for your distro);
- the S3 keys can list, write and delete in the bucket (an R2 token with an IP allow-list is named as such, with this machine's public IP);
- the repository exists and the password opens it, or, if there is none yet, it offers to create
one (
--yescreates it without asking); - the SMTP login works, if email is configured, and it can send a test email.
If a check fails, nothing is saved unless you answer "save anyway" at the prompt.
Without --config, the settings are asked for one by one. The profile is saved as
/etc/resticbackups3/<profile>/.env (root only, 0600) and config.toml (0644). After that you
may delete your own copies, but keep RESTIC_PASSWORD in a password manager: without it no
backup can be restored.
Install
Needs Linux, Python 3.12 or newer, and restic 0.16 or newer.
| Tool | Install | Update |
|---|---|---|
| pipx | pipx install resticbackups3 |
pipx upgrade resticbackups3 |
| uv | uv tool install resticbackups3 |
uv tool upgrade resticbackups3 |
| pip (in a venv) | pip install resticbackups3 |
pip install --upgrade resticbackups3 |
Run rbs3 as your normal user; it asks for sudo itself when it needs it.
Development
python -m venv .venv && . .venv/bin/activate
pip install -e ".[dev]" ruff mypy
git config core.hooksPath .githooks # blocks commits containing strings from notes/deny-list.txt
ruff check . && ruff format --check . && mypy && pytest -n auto
tests/test_integration.py runs the checks against a real restic and S3 endpoint when
RBS3_IT_ENDPOINT, RBS3_IT_BUCKET, RBS3_IT_KEY and RBS3_IT_SECRET are set. CI starts
Versity Gateway for it.
Pull request titles follow Conventional Commits; a merged
feat: or fix: publishes a release.
License
MIT
Metadata
Release files for resticbackups3 0.2.0
For a detailed explanation of source distributions (sdists) and built distributions (wheels), please see the package formats documentation.
Source distribution (sdist)
| File | Size | Uploaded | Provenance | Actions |
|---|---|---|---|---|
| resticbackups3-0.2.0.tar.gz | 46.7 kB | With provenance | Details for resticbackups3-0.2.0.tar.gz |
Built distribution (wheel)
| File | Interpreter | ABI | Platform | Actions Reset |
|---|---|---|---|---|
| resticbackups3-0.2.0-py3-none-any.whl | Python 3 | none | any | Details for resticbackups3-0.2.0-py3-none-any.whl |
Total release size: 105.2 kB
Release files / resticbackups3-0.2.0.tar.gz
| Download URL | resticbackups3-0.2.0.tar.gz |
|---|---|
| Size | 46.7 kB |
| Tags | Source |
|
SHA-256 checksum How to use checksums |
cddc911a32a35de3f2a9f26355ef7eeba074de83c38e9ef92a717fe42a001760
|
|
BLAKE2b-256 checksum How to use checksums |
3cc17fff658162afda28895d0a4b601170610356d226125d350755d5501a628c
|
| Upload date | |
|
Uploaded using Trusted Publishing? What is trusted publishing? |
Yes |
| Uploaded via |
twine/7.0.0 CPython/3.13.16
|
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 Nov 30, 2026.
Transparency logRelease files / resticbackups3-0.2.0-py3-none-any.whl
| Download URL | resticbackups3-0.2.0-py3-none-any.whl |
|---|---|
| Size | 58.5 kB |
| Tags | Python 3 |
|
SHA-256 checksum How to use checksums |
8f39ce757416671bf1796eaa0bf5b655b3ee71fa8e4a19992b4adcc9ee64d9e3
|
|
BLAKE2b-256 checksum How to use checksums |
d2101b2d87d8d13d7a0921681ff49a3afe7cc75bd22e91aeade905e0610d1b42
|
| Upload date | |
|
Uploaded using Trusted Publishing? What is trusted publishing? |
Yes |
| Uploaded via |
twine/7.0.0 CPython/3.13.16
|
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 Nov 30, 2026.
Transparency logSecurity for resticbackups3 0.2.0
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.
Attestation for resticbackups3-0.2.0.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 Nov 30, 2026.
Transparency logA 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.