trubackup
trubackup is database backup program designed to work with openedx data sources, but not specific to it.
trubackup is a wrapper around restic.
installation
manual
Make sure that you have following software installed in your environment:
Python 3.11
Then, run pip install trubackup==3.1.1.
docker
docker pull trubackup:3.1.1
running
preparations
You need restic repository set up elsewhere for trubackup to operate. Consult restic docs to do it.
Before running trubackup make sure that RESTIC_REPOSITORY and RESTIC_PASSWORD are set.
config
You can use example/trubackup.json in repo as a reference. All the sections are mandatory, but you can set mysql, mongo and s3 to empty list if you don’t want to backup those.
There’s two ways to pass config location to trubackup:
Put it in the TRUBACKUP_CONFIG_PATH environment variable
Pass it as the value of -c or --config command line flag
If neither is used, trubackup will /etc/trubackup.json as fallback.
backup
Run trubackup backup. The last line in it’s output will be backup ID.
list & show
trubackup list and trubackup show are informational commands. You can use the first one to show a list of available backups and the second one to inspect individual backup contents.
restore
Run trubackup restore <BACKUP_ID>. Make sure to replace <BACKUP_ID> with your backup ID.
running regularily
There’s example systemd service & timer in systemd/ directory.
deleting old backups
There’s contrib/delete_old.py script in this repo that will run restic forget command with arguments adjustable by environment variables. Make sure that you read the script before running it. It is destructive.
Metadata
Release files for trubackup 5.0.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 |
|---|---|---|---|---|
| trubackup-5.0.0.tar.gz | 19.6 kB | Without provenance | Details for trubackup-5.0.0.tar.gz |
Built distribution (wheel)
| File | Interpreter | ABI | Platform | Actions Reset |
|---|---|---|---|---|
| trubackup-5.0.0-py3-none-any.whl | Python 3 | none | any | Details for trubackup-5.0.0-py3-none-any.whl |
Total release size: 41.0 kB
Release files / trubackup-5.0.0.tar.gz
| Download URL | trubackup-5.0.0.tar.gz |
|---|---|
| Size | 19.6 kB |
| Tags | Source |
|
SHA-256 checksum How to use checksums |
e82a158630f9aa9b487030d1171fe7b88833ed65319ddabbaf19a23a76476ad2
|
|
BLAKE2b-256 checksum How to use checksums |
81231d12bcfd614f39bf82078d7c451de19a47f8d626b47eba2186c6b5f9b04a
|
| Upload date | |
|
Uploaded using Trusted Publishing? What is trusted publishing? |
No |
| Uploaded via |
twine/4.0.2 CPython/3.11.4
|
Release files / trubackup-5.0.0-py3-none-any.whl
| Download URL | trubackup-5.0.0-py3-none-any.whl |
|---|---|
| Size | 21.5 kB |
| Tags | Python 3 |
|
SHA-256 checksum How to use checksums |
b0707509d5e03b2aa17581d5bed6cbb52afb4294c279ae8203ab397cf79cb830
|
|
BLAKE2b-256 checksum How to use checksums |
83c494661129679bf2a14b43426f86a02827ac32f315513903c55cdaf679108e
|
| Upload date | |
|
Uploaded using Trusted Publishing? What is trusted publishing? |
No |
| Uploaded via |
twine/4.0.2 CPython/3.11.4
|
Security for trubackup 5.0.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.
No provenance found
None of the files in this release were uploaded with provenance metadata.
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.