diff options
author | EuAndreh <eu@euandre.org> | 2024-05-03 15:24:10 -0300 |
---|---|---|
committer | EuAndreh <eu@euandre.org> | 2024-05-03 15:24:10 -0300 |
commit | 6b289aea1692ffc518d126b4fa3a5fa52db1af58 (patch) | |
tree | 7cacbfde1b9e47213aa06f9f3ea94ff4c1d917cb /bin | |
parent | bin/borgy: Wrapper on borg(1) with better defaults (diff) | |
download | dotfiles-6b289aea1692ffc518d126b4fa3a5fa52db1af58.tar.gz dotfiles-6b289aea1692ffc518d126b4fa3a5fa52db1af58.tar.xz |
bin/backup: Rewrite using borgy
Diffstat (limited to 'bin')
-rwxr-xr-x | bin/backup | 36 |
1 files changed, 8 insertions, 28 deletions
@@ -92,31 +92,11 @@ shift $((OPTIND - 1)) ARCHIVE_TAG="${1:-manual}" -run() { - STATUS=0 - set -x - # The contents of $VERBOSE_FLAGS doesn't involve user input: - # shellcheck disable=2086 - nicely borg create \ - $VERBOSE_FLAGS \ - --comment "$COMMENT" \ - --exclude "$XDG_CACHE_HOME" \ - --exclude ~/Downloads/ \ - --exclude ~/mnt/ \ - --stats \ - --compression lzma,9 \ - "::{hostname}-{now}-$ARCHIVE_TAG" \ - ~/ || STATUS=$? - set +x - - if [ "$STATUS" = 0 ]; then - return 0 - elif [ "$STATUS" = 1 ]; then - printf 'WARNING, but no ERROR.\n' >&2 - return 0 - else - return "$STATUS" - fi -} - -run +set -x +# The contents of $VERBOSE_FLAGS doesn't involve user input: +# shellcheck disable=2086 +borgy \ + $VERBOSE_FLAGS \ + --comment "$COMMENT" \ + "::{hostname}-{now}-$ARCHIVE_TAG" \ + ~/ |