Synchronization with excluded remote directories deletes local files

Advertisement

mangrove
Guest

Synchronization with excluded remote directories deletes local files

When using synchronization local <= remote and file masks to exclude remote directories, the option -delete actually deletes those local directories excluded by the remote mask! That can not be right. :shock: :lol: Instead, the behaviour one would expect is that the ignored directory would be unaffected on the local drive.

Reply with quote

Advertisement

martin
Site Admin
martin avatar
Joined:
Posts:
40,476
Location:
Prague, Czechia

Re: Synchronization with excluded remote directories deletes local files

You have to exclude both the local and the remote directory.

If you exclude by name only, it's automatically applied to both sides.

If you exclude by full path, it's excluded only on the side with the respective path syntax.

Reply with quote

mangrove
Guest

Yup, this was the problem. (Together with an additional problem of missing trailing backslashes at the local side.)

However, I have read the documentation again and it was -- and still is -- not clear to me that this would happen. May I suggest an additional note in the form of:

"Note that excluding a path on only one side when using the option -delete will trigger a deletion on the other side, due to the deletion logic being applied after the exclusion logic"

Or something similar.

Reply with quote

Advertisement

You can post new topics in this forum