Package: borg-drone
borg-drone(yet another) borg wrapper.This application is a helper to run multiple borg backups with a single command.DependenciesborgPython 3.5+InstallationInstall via pip (WIP)pipinstallborg-droneInstall from source (requires pip v21.2 or later)gitclonehttps://git.sr.ht/~jmstover/borg-dronecdborg-drone
pipinstall.UsageGenerate a new configuration fileborg-dronegenerate-configEdit the configuration file to suit the local backup needs# borg-drone configuration consists of two main sections: 'repositories' and 'archives'## Repositories are local or remote (SSH) targets where the borg repository will be created.# Many repositories can be defined in this section, but only those referenced by an archive will be used.## Archives are local to the machine running borg-drone and define the folders to be backed up and excluded.# All archives defined here will be used by default.repositories:# Local repository definitionslocal:# Local backup location Alocal-example:path:/backups/example-aencryption:keyfile-blake2prune:-keep-daily:7-keep-weekly:3-keep-monthly:6-keep-yearly:2compact:false# Local backup location B which will be uploaded to an rclone remotelocal-example-2:path:/backups/example-bencryption:keyfilecompact:trueupload_path:'b2:backups'# Remote repository definitionsremote:# Remote borg repository located at backups.example.comremote-example:hostname:backups.example.comusername:backupport:22ssh_key:~/.ssh/borgencryption:repokey-blake2prune:-keep-daily:7-keep-weekly:3-keep-monthly:6-keep-yearly:2compact:falsearchives:# Backup definition for this machinethis-machine:# Use multiple repositories as defined aboverepositories:-local-example-a-remote-example# Include the following directoriespaths:-~/.ssh-~/.gnupg-~/Desktop-~/Documents-~/Pictures# Exclude the following patterns (these are passed directly to borg)exclude:-"**/venv"-"**/node_modules"# Enable the --one-file-system borg optionsone_file_system:trueList all configured targetsborg-dronetargetsInitialise repositories (This callsborg initon all repositories)borg-droneinitExport the keys and password files for backup outside of the repository.These will be required in order to restore the backup!borg-dronekey-exportClean up the exported key files so they do not hang around on your machineborg-dronekey-cleanupCreate a new backup (This callsborg createon all repositories)borg-dronecreateView repository info. (This callsborg infoon all repositories)borg-droneinfoList repository files. (This callsborg liston all repositories)borg-dronelistImport an existing key and password into a target# Import key and password for archive 'this-machine' on repository 'local-example-a'borg-dronekey-importthis-machine:local-example-a--keyfile/path/to/keyfile--password-file/path/to/password-filerclone UploadsLocal repositories can optionally be uploaded to an rclone remoteupload_pathoption.This feature requiredrcloneto be installed and configured. A remote must be initialised prior to runningborg-drone create.
See therclone documentationfor details.Repositories will be uploaded to<upload_path>/<archive_name>e.g.Using the following configuration:repositories:local:usb:path:/backup/usbencryption:keyfile-blake2upload_path:'b2:backups'archives:archive1:repositories:-usbpaths:-/dataData will first be backed up to a borg repository located at/backup/usb,
then the borg repository itself will be uploaded to the remote pathb2:backups/archive1/