use cp and rm instead of mv
This commit is contained in:
@@ -144,7 +144,8 @@ while read -r line; do
|
|||||||
|
|
||||||
# Push encrypted backup to final backup destination
|
# Push encrypted backup to final backup destination
|
||||||
logecho "${RHOST}: Moving $(basename "${DEST}") to ${DEST_FINAL}"
|
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
|
# Delete all old directories except the $MAXBAK most recent
|
||||||
if [ $(ls -tp "${BACKUPDIR}"/"${RHOST}"/ | grep '/$' | wc -l | tr -d ' ') -gt $MAXBAK ]; then
|
if [ $(ls -tp "${BACKUPDIR}"/"${RHOST}"/ | grep '/$' | wc -l | tr -d ' ') -gt $MAXBAK ]; then
|
||||||
|
|||||||
Reference in New Issue
Block a user