New on LowEndTalk? Please Register and read our Community Rules.
All new Registrations are manually reviewed and approved, so a short delay after registration may occur before your account becomes active.
All new Registrations are manually reviewed and approved, so a short delay after registration may occur before your account becomes active.
Need a little help with rsync - not ignoring files?
I'm having a bit of trouble with rsync trying to copy files that already exist in the destination.
I originally copied these files from source A to destination B. I later moved the files from B to destination C. I'm Now trying to update the C from A, but instead of just copying the differences, rsync is attempting to copy everything.
Originally I ran with the arguments -avz and after a little googling, I tried --ignore-existing but I get the same result.
Any ideas? I can't seem to find any instance of the same issue on the intarwebs.
Comments
when you copy files,some attributes of the files maybe changed,so rsync thought they are difference files
None of the existing files have been modified since the first sync, there are just new files added to the directory structure.
how to copy at the first time?also rsync?
--ignore-existing sounds like it should work, I tried it with rsync -avz on two directories and it didn't update the non-identical file. Not sure why it's not working for you. What other options are you using (these might override it)?
Yep, every transfer was made using rsync.
Only the -e parameter in addition to -avz
Double check perms and ownership are the same.
Well..that is against what "rsync" offers. Something ( like metadata ) must have changed with those files I believe and thus the files are synced again. Also "rsync -vrplogDtH" is what I use always as it will copy over everything as it is.
They weren't, but that was intentional and shouldn't have caused al the files to be redownloaded; if the files are identical and permissions aren't, rsync very quickly changes them all. I tested this.
I can't figure how anything could have changed, the source 1 hasn't been switched on for months, so I can't work out how anything would have changed.
Just to finish this off, thanks for all the suggestions but in the end I just let the rsync run in full over the course of the last two days, and I'll just have to hope I don't need to move the files again!