1

I always do a mutual sync by issuing always "rsync -avuzb src dest" and then "rsync -avuzb dest src". If I use "rsync -avuzb ", already existing files are renamed to ~ on the destination, due to the b option. Now assume I have two files file and file~ on both, src and dst. The mutual sync now renames file~ to file~~ on each side. Although this is logically correct is is not practically desireble for me, since this means that the ~~~~~-files are piling up at each backup. Is there a way to only have one backup-file?

2

Try this additional parameter:

--exclude '*~'

to make:

rsync -avuzb --exclude '*~' src dst

Hope that helps.

0

There is no problem. The ~~~ files won't pile up. On your source folder you would typically have: a.c and a.c~ Nothing else. Even if both files change many times the rsync folder will only have 3 files: a.c a.c~ a.c~~

  • Are you saying that the max number of files is three? So if OP ran that backup once more, he wont have a.c~~~? Which file gets replaced? – Cfinley Jun 16 '15 at 20:13

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Not the answer you're looking for? Browse other questions tagged or ask your own question.