diff options
author | TheMightyV <themightyv@protonmail.com> | 2022-01-04 22:17:50 +0100 |
---|---|---|
committer | TheMightyV <themightyv@protonmail.com> | 2022-01-04 22:17:50 +0100 |
commit | c94132808d2a3499f19f86424bfdedf9e0c39312 (patch) | |
tree | ed77cd2eb5b3f73e10a081918be3ee8e12b53d84 /backends/borg.sh | |
parent | fc9f81108360e528f8adfccf8051c79e089df2c3 (diff) | |
download | minecraft-server-tools-c94132808d2a3499f19f86424bfdedf9e0c39312.tar.gz |
testing backups
hid some messages behind VERBOSE option
unified date formats of tars
Diffstat (limited to 'backends/borg.sh')
-rw-r--r-- | backends/borg.sh | 7 |
1 files changed, 4 insertions, 3 deletions
diff --git a/backends/borg.sh b/backends/borg.sh index 0b28619..5d7b2c7 100644 --- a/backends/borg.sh +++ b/backends/borg.sh @@ -16,7 +16,7 @@ function borg_create_backup() { trap 'echo $( date ) Backup interrupted >&2; exit 2' INT TERM - echo "borg: starting backup to \"$backup_dir\"" + echo_debug "borg: starting backup to \"$backup_dir\"" borg create \ "${backup_dir}::${BACKUP_NAME}_$(date +'%F_%H-%M-%S')" \ @@ -27,7 +27,7 @@ function borg_create_backup() { local backup_exit=$? - echo "borg: pruning repository at \"$backup_dir\"" + echo_debug "borg: pruning repository at \"$backup_dir\"" borg prune \ --prefix '{hostname}-' \ @@ -45,7 +45,7 @@ function borg_create_backup() { retcode=$(( global_exit > retcode ? global_exit : retcode )) if [ ${global_exit} -eq 0 ]; then - echo "borg: backup and prune finished successfully" + echo_debug "borg: backup and prune finished successfully" elif [ ${global_exit} -eq 1 ]; then echo "borg: backup and/or prune finished with warnings" else @@ -75,6 +75,7 @@ function borg_restore() { export BORG_PASSCOMMAND="$BACKUP_PASSCOMMAND" local remote="$1" local snapshot="$2" + local dest="$3" export BORG_REPO="$remote" borg extract "${remote}::${snapshot}" |