added -y fuzzy and --delete-after useful for fuzzy see rsync manpage
--fuzzy, -y This option tells rsync that it should look for a basis file for any destination file that is missing. The current algorithm looks in the same directory as the destination file for either a file that has an identical size and modified-time, or a similarly-named file. If found, rsync uses the fuzzy basis file to try to speed up the transfer. If the option is repeated, the fuzzy scan will also be done in any matching alternate destination directories that are specified via --compare-dest, --copy-dest, or --link-dest. Note that the use of the --delete option might get rid of any potential fuzzy-match files, so either use --delete-after or specify some filename exclusions if you need to prevent this.
This commit is contained in:
parent
4ef0287961
commit
5ec905bbca
@ -86,7 +86,7 @@ var-lib-docker
|
|||||||
sshopts="g_retrycmd ssh -n -p $BACKUPSRVPORT -o BatchMode=yes -o StrictHostKeyChecking=accept-new $BACKUPSRVUSER@$BACKUPSRV"
|
sshopts="g_retrycmd ssh -n -p $BACKUPSRVPORT -o BatchMode=yes -o StrictHostKeyChecking=accept-new $BACKUPSRVUSER@$BACKUPSRV"
|
||||||
fi
|
fi
|
||||||
|
|
||||||
rsyncopts="-aXAh --no-inc-recursive --timeout=180 --force --delete --ignore-missing-args --inplace --partial"
|
rsyncopts="-aXAh --no-inc-recursive --timeout=180 --force -yy --delete-after --ignore-missing-args --partial"
|
||||||
[ -n "$BACKUPEXCLUDES" ] && rsyncopts="$rsyncopts --delete-excluded --exclude-from=$BACKUPEXCLUDES"
|
[ -n "$BACKUPEXCLUDES" ] && rsyncopts="$rsyncopts --delete-excluded --exclude-from=$BACKUPEXCLUDES"
|
||||||
[ -n "$BACKUPSRV" ] && rsyncopts="$rsyncopts -e 'ssh -p $BACKUPSRVPORT'"
|
[ -n "$BACKUPSRV" ] && rsyncopts="$rsyncopts -e 'ssh -p $BACKUPSRVPORT'"
|
||||||
[ "$BACKUPSRVUSER" == "root" ] && syncopts="$rsyncopts --numeric-ids"
|
[ "$BACKUPSRVUSER" == "root" ] && syncopts="$rsyncopts --numeric-ids"
|
||||||
|
Loading…
Reference in New Issue
Block a user