From 9b3608d0faa9513a453efc3ca595eb021291ce39 Mon Sep 17 00:00:00 2001 From: Max Mehl Date: Wed, 13 Dec 2023 12:07:35 +0100 Subject: [PATCH] use cp and rm instead of mv --- uberspace-backup.sh | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/uberspace-backup.sh b/uberspace-backup.sh index cef315e..dd4abaa 100755 --- a/uberspace-backup.sh +++ b/uberspace-backup.sh @@ -144,7 +144,8 @@ while read -r line; do # Push encrypted backup to final backup destination logecho "${RHOST}: Moving $(basename "${DEST}") to ${DEST_FINAL}" - mv "${DEST}".tar.gpg "${DEST_FINAL}/" + cp "${DEST}".tar.gpg "${DEST_FINAL}/" + rm "${DEST}".tar.gpg # Delete all old directories except the $MAXBAK most recent if [ $(ls -tp "${BACKUPDIR}"/"${RHOST}"/ | grep '/$' | wc -l | tr -d ' ') -gt $MAXBAK ]; then