mardi 3 mars 2015

Rsync not overwriting files



  1. I have 2 directories- etc and oldroot/etc

  2. I want all the files in etc to match exactly as oldroot/etc

  3. If there are any files in etc that are not in oldroot/etc, I want to preserve them as is


I have tried every variety of flags I can think of with rsync, but I cannot get the desired result.



# # A few of the simpler commands I have tried
# rsync -Ia oldroot/etc etc
# rsync -Iac oldroot/etc etc
# rsync -ac oldroot/etc etc


They complete without errors. When I do a diff on the directories (diff -r oldroot/etc etc), there remains several of the same files that exist in both directories and with different content. I've been working on this 2 days, and needless to say I am frustrated beyond belief.



Aucun commentaire:

Enregistrer un commentaire