BORG_GENERAL_OPTIONS="--show-rc --show-version --info" # Report start of backup to prom notify-prom-status.sh start # Run backup borg $BORG_GENERAL_OPTIONS \ create \ --stats \ --one-file-system \ --exclude-if-present .backupignore \ --keep-exclude-tags \ $BORG_REPO::$BORG_HOSTNAME-{now} \ $BORG_SOURCE_PATH # Report backup exit code to prom notify-prom-status.sh $? # Prune old backups borg $BORG_GENERAL_OPTIONS \ prune \ $BORG_RETENTION \ $BORG_REPO # Free space by compacting segments borg $BORG_GENERAL_OPTIONS \ compact \ $BORG_REPO # Report backup statistics to prom notify-prom-stats.sh