Backup management for restic
Project description
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".
Project details
Release history Release notifications | RSS feed
Download files
Download the file for your platform. If you're not sure which to choose, learn more about installing packages.
Source Distribution
Built Distribution
File details
Details for the file bumgr-0.2.1.tar.gz
.
File metadata
- Download URL: bumgr-0.2.1.tar.gz
- Upload date:
- Size: 12.5 kB
- Tags: Source
- Uploaded using Trusted Publishing? Yes
- Uploaded via: twine/5.1.1 CPython/3.12.7
File hashes
Algorithm | Hash digest | |
---|---|---|
SHA256 | acf35c22911a2138e45bc1cac5ba6457dde4329feff718b9b72d41108ba38108 |
|
MD5 | 01892e4670b5c1bba27f014905f6ec6a |
|
BLAKE2b-256 | dec9af0427d299765b787aabd3dc12e0f0e72621b084a09925d82f47975f55cb |
Provenance
The following attestation bundles were made for bumgr-0.2.1.tar.gz
:
Publisher:
publish.yml
on 3j14/bumgr
-
Statement type:
https://in-toto.io/Statement/v1
- Predicate type:
https://docs.pypi.org/attestations/publish/v1
- Subject name:
bumgr-0.2.1.tar.gz
- Subject digest:
acf35c22911a2138e45bc1cac5ba6457dde4329feff718b9b72d41108ba38108
- Sigstore transparency entry: 147797000
- Sigstore integration time:
- Predicate type:
File details
Details for the file bumgr-0.2.1-py3-none-any.whl
.
File metadata
- Download URL: bumgr-0.2.1-py3-none-any.whl
- Upload date:
- Size: 13.2 kB
- Tags: Python 3
- Uploaded using Trusted Publishing? Yes
- Uploaded via: twine/5.1.1 CPython/3.12.7
File hashes
Algorithm | Hash digest | |
---|---|---|
SHA256 | dd9fc86165b1c2e7151fff59b72f9ddead50d2bf9749b699b209ad9059692df3 |
|
MD5 | 1d8bb0c7f3ba29178d0a9b013da1f7cd |
|
BLAKE2b-256 | 9508196edf6847805a9d460276596b435c824f562d3d872a8f278a35d782dd66 |
Provenance
The following attestation bundles were made for bumgr-0.2.1-py3-none-any.whl
:
Publisher:
publish.yml
on 3j14/bumgr
-
Statement type:
https://in-toto.io/Statement/v1
- Predicate type:
https://docs.pypi.org/attestations/publish/v1
- Subject name:
bumgr-0.2.1-py3-none-any.whl
- Subject digest:
dd9fc86165b1c2e7151fff59b72f9ddead50d2bf9749b699b209ad9059692df3
- Sigstore transparency entry: 147797001
- Sigstore integration time:
- Predicate type: