Skip to main content

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


Download files

Download the file for your platform. If you're not sure which to choose, learn more about installing packages.

Source Distribution

bumgr-0.4.2.tar.gz (16.4 kB view details)

Uploaded Source

Built Distribution

bumgr-0.4.2-py3-none-any.whl (17.2 kB view details)

Uploaded Python 3

File details

Details for the file bumgr-0.4.2.tar.gz.

File metadata

  • Download URL: bumgr-0.4.2.tar.gz
  • Upload date:
  • Size: 16.4 kB
  • Tags: Source
  • Uploaded using Trusted Publishing? Yes
  • Uploaded via: twine/5.1.1 CPython/3.12.7

File hashes

Hashes for bumgr-0.4.2.tar.gz
Algorithm Hash digest
SHA256 5abd8f87b63b8e280a8241cda6954b97accc3441a7eddf73a7225ddceec359c4
MD5 61ce498f878b357adf2773c16782ded2
BLAKE2b-256 2df6006db2e2a7b5ed49e2dbe78cc978f67cc670e1a80be465ccfe7312565cea

See more details on using hashes here.

Provenance

The following attestation bundles were made for bumgr-0.4.2.tar.gz:

Publisher: publish.yml on 3j14/bumgr

Attestations:

File details

Details for the file bumgr-0.4.2-py3-none-any.whl.

File metadata

  • Download URL: bumgr-0.4.2-py3-none-any.whl
  • Upload date:
  • Size: 17.2 kB
  • Tags: Python 3
  • Uploaded using Trusted Publishing? Yes
  • Uploaded via: twine/5.1.1 CPython/3.12.7

File hashes

Hashes for bumgr-0.4.2-py3-none-any.whl
Algorithm Hash digest
SHA256 99b85178f8ef5ae1e0bcfccde41783c1b4725c0441c36e5ca3349470e9674547
MD5 fdbba028bfa2dc64c4a0de83fd6c1e40
BLAKE2b-256 2ef24cbca08c5ab31820b7a652d6b20b12f4f57476fe2403f0f4d05b297c0765

See more details on using hashes here.

Provenance

The following attestation bundles were made for bumgr-0.4.2-py3-none-any.whl:

Publisher: publish.yml on 3j14/bumgr

Attestations:

Supported by

AWS AWS Cloud computing and Security Sponsor Datadog Datadog Monitoring Fastly Fastly CDN Google Google Download Analytics Microsoft Microsoft PSF Sponsor Pingdom Pingdom Monitoring Sentry Sentry Error logging StatusPage StatusPage Status page