backup - use cp & rm instead of mv (if target is on another file system)
This commit is contained in:
@@ -187,7 +187,9 @@ step_3() {
|
|||||||
exep "mv -f '${buTarget}/${buLog}0.log' '/tmp/${buLog}1.log' 2>/dev/null"
|
exep "mv -f '${buTarget}/${buLog}0.log' '/tmp/${buLog}1.log' 2>/dev/null"
|
||||||
exep "'${sq_toolBin}' ${customFlags[*]} --info=stats2 ${buExcludes[*]} '${tmpSource}' '${tmpTarget}' > '/tmp/${buLog}0.log'"
|
exep "'${sq_toolBin}' ${customFlags[*]} --info=stats2 ${buExcludes[*]} '${tmpSource}' '${tmpTarget}' > '/tmp/${buLog}0.log'"
|
||||||
|
|
||||||
exe mv -f /tmp/"${buLog}"*.log "${buTarget}"
|
# mv is not the right tool moving files to a different file system
|
||||||
|
exe cp /tmp/"${buLog}"*.log "${buTarget}"
|
||||||
|
exe rm -rf /tmp/"${buLog}"*.log
|
||||||
exe sync
|
exe sync
|
||||||
if (( remount )) ; then
|
if (( remount )) ; then
|
||||||
exep "mount -o ro,remount '${buTarget}' >>/dev/null 2>&1"
|
exep "mount -o ro,remount '${buTarget}' >>/dev/null 2>&1"
|
||||||
|
Reference in New Issue
Block a user