fix(RESTORE): fix accidental log file overwrite vs append

This commit is contained in:
Asif Bacchus 2021-02-09 06:39:38 -07:00
parent b07ad2c0ee
commit ea0d98734a

View File

@ -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