use cp and rm instead of mv

This commit is contained in:
2023-12-13 12:07:35 +01:00
parent 29aa4352fd
commit 9b3608d0fa

View File

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