usb_backup: update rsync flags to improve speed

(cherry picked from commit 3c4e34f4e132dfebb74d77f089fca5f323e88eed)
This commit is contained in:
Romain Bazile 2021-06-02 14:02:06 +02:00 committed by Romain Bazile
parent 07a808aa04
commit 3550dcf362

View file

@ -105,7 +105,7 @@ do_backup()
BACKUP_FOLDER="${MOUNT_POINT}/planktoscope_data/${MACHINE}"
${log} "Machine name is ${MACHINE}, backup folder is ${BACKUP_FOLDER}"
mkdir -p "$BACKUP_FOLDER"
rsync -rtD --modify-window=1 --update "$SOURCE" "$BACKUP_FOLDER"
rsync -rtD --modify-window=1 --update -W --inplace "$SOURCE" "$BACKUP_FOLDER"
if ! python3 -m planktoscope.integrity -c "$BACKUP_FOLDER"; then
${log} "ERROR: Some files were corrupted during the copy!"
do_unmount