Dear rsync community, I hope that someone can help me with this issue, probably related to my lack of understanding of how rsync recursive works. In the output was displayed something like this (I don't remember in the lines below whether rsync was deleting or creating files or both, but I think this won't matter): --8<---------------cut here---------------start------------->8--- A/B/... A/file1 A/B/... --8<---------------cut here---------------end--------------->8--- In other words, the recursion did not happen linearly (according to the tree structure of either the sender or the receiver). This is very counter-intuitive: I'd expect that every line which lies between any two lines of the form "A/B/..." would also have to start by "A/B/..." Can someone explain this, please? I would be most grateful for any clarification. Many thanks in advance for your invaluable help.
The only explanation I can find for such behaviour is that incremental recursion is being used, which leads me to deduce that the lines with path outside of the directory "A/B/...", can only indicate folder creation. But yet I cannot buy this explanation because why would such "atypical folders" be created in the middle of the recursion "A/B/...", rather than together with the empty folder "A/B/" immediately after rsync enters folder "A", and before rsync starts dealing with files inside "A/B/"?
crateman.universalistic356 at aceecat.org
2024-Jul-09 16:29 UTC
[HELP] rsync recursive jumps across directories
On Tue, Jul 09, 2024 at 11:37:19AM GMT, BP25 via rsync wrote:> In other words, the recursion did not happen linearly (according to > the tree structure of either the sender or the receiver). This is > very counter-intuitive: I'd expect that every line which lies > between any two lines of the form "A/B/..." would also have to start > by "A/B/..."Breadth-first search of the source tree could have this effect. IOW, imagine rsync pushing the names onto a queue, instead of a stack. But I don't know if that is what actually happens - just a guess. -- Ian