Run two-stages backups #1

Merged
mxmehl merged 10 commits from two-staged-backup into master 2023-12-13 12:22:55 +01:00
Showing only changes of commit 9b3608d0fa - Show all commits

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