#!/bin/bash set -euo pipefail cd / . /etc/borg/env export BORG_REPO export BORG_RSH cmd=() cmd+=(borg create) cmd+=(--stats) #cmd+=(--progress) #cmd+=(--json) cmd+=(--exclude-from=/etc/borg/excludes) cmd+=(--patterns-from=/etc/borg/patterns) cmd+=(::'{hostname}-{now:%Y-%m-%dT%H:%M:%S}') echo BORG_RSH=$BORG_RSH echo BORG_REPO=$BORG_REPO set -x time "${cmd[@]}" borg info --last 1