--link-dest but only if rsync detects differences
daniel.ml.spam at gmail.com
Fri Nov 14 20:07:12 GMT 2008
> I don't believe there is any better way than the two you have suggested:
> run and delete if there were no changes, or check first with -n. Note
> that with the first approach, you don't need a separate diff command;
> you can just use -i and check whether the itemize output is nonempty.
I see, something like this to remove an equivalent backup after rsync
rsync -ai --link-dest=../backup.previous/ source/ backup.next/ | grep -qv
'^cd+++++++++' || rm -r backup.next/
Similar to reading --stats to clean up or run again without -n. Likewise it
will miss empty directory changes (created or removed), but that's really
not a problem for me.
Thanks for taking the time to consider it and the suggestions.
-------------- next part --------------
HTML attachment scrubbed and removed
More information about the rsync