Bumgr
bumgr is a Python CLI application to manage backups using restic.
The name is short for "Backup Manager".
Usage
Bumgr uses information stored in a configuration file located e.g. at
~/.config/bumgr/config.toml. See Configuration for more information.
Backup
To backup using Bumgr, you can use the bumgr backup command. If you
only want to backup a specific backup configuration, you can specify
the name of the backup (as specified in your config.toml):
bumgr backup mybackup
Mount
You may need to specify the mountpoint (an empty directory):
bumgr mount mybackup ~/Backup
Alternatively, you can specify the default mountpoint in the config.toml
file.
Using restic itself
To use your configuration with the restic executable, you can use the
bumgr env <backup> command. It outputs a list of environment variables
like RESTIC_REPOSITORY="somerepo" RESTIC_PASSWORD_FILE="some/file".
You can then pass these environment variables to restic:
eval $(bumgr env backupname) restic snapshots
Configuration
The configuration is written in TOML and has two sections: A global section used for defining global plugins, and a backup section that configures the individual backups.
An example configuration could look something like this:
[backups.example_sftp]
repository = "sftp:my-backup-server.example.org:/restic"
source = "$HOME" # backup the entire home directory
exclude_file = ["$HOME/.backup-excludes.txt", "$HOME/.gitignore_global"]
# Use macOS Keychain to retrieve password (see 'man 1 security', macOS only)
password_command = "security find-generic-password -a restic -s 'Restic Backup' -g -w"
# also possible:
# password_file = ".config/bumgr/password-file.txt"
[[backups.example_sftp]]
# Make sure Tailscale is connected before starting the backup
module = "bumgr.contrib.tailscale.Tailscale"
args.connected = true
[backups.s3example]
repository = "s3:my-s3-server.example.org/bucket/example/restic"
source = "/"
exclude = ["/var", "/dev"]
password_file = "/etc/bumgr/password-file-root.txt"
[backups.s3example.env]
AWS_ACCESS_KEY_ID = "mys3accesskey"
AWS_SECRET_ACCESS_KEY = "very-secret-key"
License
Bumgr is licensed under the "BSD 3-Clause License".
Release files for bumgr 0.5.1
For a detailed explanation of source distributions (sdists) and built distributions (wheels), please see the package formats documentation.
Source distribution (sdist)
| File | Size | Uploaded | |
|---|---|---|---|
| bumgr-0.5.1.tar.gz | 16.9 kB | Details |
Built distribution (wheel)
| File | Interpreter | ABI | Platform | Reset |
|---|---|---|---|---|
| bumgr-0.5.1-py3-none-any.whl | Python 3 | none | any | Details |
Total release size: 34.5 kB
Release files / bumgr-0.5.1.tar.gz
| Download URL | bumgr-0.5.1.tar.gz |
|---|---|
| Size | 16.9 kB |
| Tags | Source |
|
SHA-256 checksum How to use checksums |
28c1738516f186dca7a0e520c82030f1fb8609c7b7d55283e63409b18619a96a
|
|
BLAKE2b-256 checksum How to use checksums |
9b8db2152aa1e809ef7b39730479a8182812b56ea822392781053b18cc8ac011
|
| Upload date | |
|
Uploaded using Trusted Publishing? What is trusted publishing? |
Yes |
| Uploaded via |
twine/6.0.1 CPython/3.12.8
|
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 Jan 16, 2025.
Transparency logRelease files / bumgr-0.5.1-py3-none-any.whl
| Download URL | bumgr-0.5.1-py3-none-any.whl |
|---|---|
| Size | 17.6 kB |
| Tags | Python 3 |
|
SHA-256 checksum How to use checksums |
3d3b2742110bc2fbd8127c71d9ca63a9b206586bad55a0af75f28757a1630e2a
|
|
BLAKE2b-256 checksum How to use checksums |
8ef0fa0cd40ece0064eaa66633c03ce65df5332f718e4b37db52714f9c21842b
|
| Upload date | |
|
Uploaded using Trusted Publishing? What is trusted publishing? |
Yes |
| Uploaded via |
twine/6.0.1 CPython/3.12.8
|
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 Jan 16, 2025.
Transparency log