Go to file
hkbakke e0ca054f3e Add initial source 2016-12-22 17:59:19 +01:00
src Add initial source 2016-12-22 17:59:19 +01:00
LICENSE Initial commit 2016-12-22 17:45:24 +01:00
README.md Update README.md 2016-12-22 17:54:59 +01:00

README.md

borgwrapper

Wrapper to simplify backups with borgbackup

Configuration

By default borgwrapper expects the configuration to be located at /etc/borgwrapper/config.sh. Ensure restrictive permissions on this file as it exposes the passphrase.

chown root:root config.sh
chmod 600 config.sh

Example cron jobs:

# Run the backup daily
23 1 * * * /usr/local/sbin/borgwrapper.sh backup

# Verify the backups once a month
40 17 23 * * /usr/local/sbin/borgwrapper.sh verify

Usage

Backup

borgwrapper.sh backup

Verify backups

borgwrapper.sh verify

Unlock after unclean exit

borgwrapper.sh unlock

Run other borg commands

Run in subshell if you do not want the passphrase stored in the current shell even after the commands have exited.

Examples:

(. /etc/borgwrapper/config.sh; export BORG_PASSPHRASE; borg list "$REPO")
(. /etc/borgwrapper/config.sh; export BORG_PASSPHRASE; borg mount "$REPO" /mnt)