borgit

Releases

Write your Borg backup jobs with sourced bash configuration files

Manual pages

Usage

borgit
  [-s|--archive-suffix archiveSuffix]
  [--]
  configurationFile [configurationFile...]
borgit --help
borgit --version

Run a single Borg backup job according to the given command line options and configuration files

borgem
  [-r|--repo-config repoConfigurationFile]
  [-s|--archive-suffix archiveSuffix]
  [--]
  jobConfigurationFile [jobConfigurationFile...]
borgem --help
borgem --version

Same-repository multi-job frontend for borgit

Setup

Basically, you write separate bash configuration files containing

Then, you use borgem to run the job(s) against any of the repositories.

As a fringe benefit you get to have further manual repository operations at your fingertips, by sourcing a repository configuration file and then operating on the repository like this:

source repos/system-online
borg list "$repo"
borg delete "$repo::etc.2019-11-02"
borg prune -y 10 -m 12 -w 50 -d 35 "$repo"

Examples

Task: Backing up

to a remote, already existing "system-online" Borg repository, into archives "etc.yyyy-MM-dd" and "ftp-server.yyyy-MM-dd".

Configuration files, and passphrase text file:

/root/borg/jobs/etc
/root/borg/jobs/ftp-server
/root/borg/repos/system-online
/root/borg/repos/system-online.passphrase

Command, executed from working directory "/root/borg":

borgem --repo-config repos/system-online -- jobs/*

The output might look like this:

 INFO  (borgem) Repository configuration file(s): "repos/system-online"
 INFO  (borgem) Borg archive suffix: ".2019-11-16"
 INFO  (borgem) Running 2 backup job(s)
 INFO  Backing up Borg archive prefix "etc"
 INFO  Backing up 1 path(s) to "backup-user@backup-system:/data/backups/borg/my-system::etc.2019-11-16"
 INFO  Backing up Borg archive prefix "ftp-server"
 INFO  Stopping "proftpd.service"
 INFO  Backing up 2 path(s) to "backup-user@backup-system:/data/backups/borg/my-system::ftp-server.2019-11-16"
 INFO  Starting "proftpd.service"
 INFO  (borgem) All backup jobs have been run without errors

Repository configuration "repos/system-online"

repo="backup-user@backup-system:/data/backups/borg/my-system"
export BORG_PASSCOMMAND="cat \"$(realpath -m "${BASH_SOURCE[0]}").passphrase\""

Job configuration "jobs/etc"

archivePrefix="$(basename "${BASH_SOURCE[0]}")"
paths+=( "/etc" )

Job configuration "jobs/ftp-server"

archivePrefix="$(basename "${BASH_SOURCE[0]}")"
paths+=( "/etc/proftpd.conf" )
paths+=( "/srv/ftp/share" )
borgCreate+=( --exclude "pp:srv/ftp/share/bind-mount" )
services+=( proftpd.service )

See also

License

GNU General Public License version 3

Packages

Browseable sources

These source files of the latest tag can be viewed in the browser:

Releases

borgit-0.1.1

14 March 2021 (2021-03-14 23:52:00 UTC)

borgit-0.1.1.tar.gz SHA256 checksum SHA384 checksum PGP signature

borgit_0.1.1-1-ubuntu-20.04-focal_all.deb SHA256 checksum SHA384 checksum PGP signature

borgit_0.1.1-1-ubuntu-22.04-jammy_all.deb SHA256 checksum SHA384 checksum PGP signature

borgit_0.1.1-1-debian-11-bullseye_all.deb SHA256 checksum SHA384 checksum PGP signature

borgit-0.1.0

14 February 2020 (2020-02-14 23:10:58 UTC)

borgit-0.1.0.tar.gz SHA256 checksum SHA384 checksum PGP signature

borgit-0.0.5

14 February 2020 (2020-02-14 22:57:45 UTC)

borgit-0.0.5.tar.gz SHA256 checksum SHA384 checksum PGP signature

borgit-0.0.4

11 December 2019 (2019-12-11 19:20:35 UTC)

borgit-0.0.4.tar.gz SHA256 checksum SHA384 checksum PGP signature

borgit-0.0.3

08 December 2019 (2019-12-08 18:13:54 UTC)

borgit-0.0.3.tar.gz SHA256 checksum SHA384 checksum PGP signature

borgit-0.0.2

06 December 2019 (2019-12-06 22:45:07 UTC)

borgit-0.0.2.tar.gz SHA256 checksum SHA384 checksum PGP signature

borgit-0.0.1

16 November 2019 (2019-11-16 16:39:51 UTC)

borgit-0.0.1.tar.gz SHA256 checksum SHA384 checksum PGP signature