From 5ec905bbca886d4fa5d2332f4686f1e9c09e7120 Mon Sep 17 00:00:00 2001 From: olli Date: Mon, 19 Dec 2022 11:43:04 +0100 Subject: [PATCH] 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. --- gaboshlib/g_backup.bashfunc | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/gaboshlib/g_backup.bashfunc b/gaboshlib/g_backup.bashfunc index 2795f9e..26efa59 100644 --- a/gaboshlib/g_backup.bashfunc +++ b/gaboshlib/g_backup.bashfunc @@ -86,7 +86,7 @@ var-lib-docker sshopts="g_retrycmd ssh -n -p $BACKUPSRVPORT -o BatchMode=yes -o StrictHostKeyChecking=accept-new $BACKUPSRVUSER@$BACKUPSRV" 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 "$BACKUPSRV" ] && rsyncopts="$rsyncopts -e 'ssh -p $BACKUPSRVPORT'" [ "$BACKUPSRVUSER" == "root" ] && syncopts="$rsyncopts --numeric-ids"