From ea0d98734a723a2139a454a9a1b2d9b441dde367 Mon Sep 17 00:00:00 2001 From: Asif Bacchus Date: Tue, 9 Feb 2021 06:39:38 -0700 Subject: [PATCH] fix(RESTORE): fix accidental log file overwrite vs append --- backup/restore.sh | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/backup/restore.sh b/backup/restore.sh index 0f5db92..6e8a017 100644 --- a/backup/restore.sh +++ b/backup/restore.sh @@ -51,7 +51,7 @@ doRestore() { sourceFiles=$(find "${backupLocation}" -iname "${1}" -type d) if [ -n "$sourceFiles" ]; then if [ "$verbose" -eq 1 ]; then - if (! (cd "$sourceFiles/_data" && tar -cf - .) | (cd "${2}" && tar xvf -) > "$logfile" ); then + if (! (cd "$sourceFiles/_data" && tar -cf - .) | (cd "${2}" && tar xvf -) >> "$logfile" ); then return 1 else return 0