I'm currently using rsync and --link-dest to give me something like a poor-man's incremental snapshot to disk. But I really only want to generate a new backup if rsync detects differences, otherwise I don't need a new backup.
Currently I do something like this: rsync -a --delete --link-dest=../backup.previous/ source/ backup.next/ diff -r backup.previous backup.next && rm -r backup.next Is there a way to tell rsync to not even bother creating backup.next if there are no differences? It looks like --compare-dest will also recreate the directory structure when there are no differences. The closest I can come up with other than cleaning up after the fact is first running rsync with -n --stats and conditionally running rsync again if the output from the first run indicates new files (which doesn't account for deletions). It seems there should be a better/cleaner way but I haven't found it from the man pages. I'm currently using rsync 2.6.9. Is it possible to make rsync perform --link-dest if and only if it detects differences? Thanks for any guidance, ~ Daniel
-- Please use reply-all for most replies to avoid omitting the mailing list. To unsubscribe or change options: https://lists.samba.org/mailman/listinfo/rsync Before posting, read: http://www.catb.org/~esr/faqs/smart-questions.html