REPO="aw:backup/backup.borg" b-list() { if [[ -z "$1" ]]; then column -t <(borg list "$REPO") borg list "$REPO" else borg list "$REPO"::"$1" fi } b-delete() { if [[ ! -z "$1" ]]; then borg delete "$REPO"::"$1" fi } b-create() { local BOOT="" if (( $EUID != 0 )); then echo -n "You aren't root, press enter to continue..." >&2 fi if [[ ! "$(hostname)" = "SGen" ]]; then BOOT="/boot" fi borg create -vpsx --compression lzma,7 --exclude-from /home/stonewareslord/syncthing/me/backup/$(hostname)/nobackup aw:backup/backup.borg::$(hostname)-$(uuidgen) / "$BOOT" } b-rename() { borg rename -v "$REPO"::"$1" "$2" } b-cmd() { echo "$REPO" }