Re: question about the recursive algorithm
Kevin Korb via rsync <[email protected]> Thu, 16 Jan 2025 09:15:37 -0500 (EST)
| Newsgroups | gmane.network.rsync.general |
|---|---|
| Message-ID | <[email protected]> |
-----BEGIN PGP SIGNED MESSAGE----- Hash: SHA1 rsync doesn't really give much control over the order it does things in. If you want to control when the deletions happen there is only - --delete-before or --delete-during but both are slower than the default - --delete. On Thu, 16 Jan 2025, BP via rsync wrote: > Date: Thu, 16 Jan 2025 13:53:04 +0000 > From: BP via rsync <[email protected]> > To: [email protected] > Subject: question about the recursive algorithm > > Hello, > > I always run rsync as follows: "sudo rsync -PaSHAXvi --del DIR1/ > DIR2". I would think that whenever I see in the output of this rsync > command a few lines of the form A/B/... and then further down in the > output again a few lines of the form A/B/... (dots are dirs or files), > then every line between such two lines is also of this form. > > I then discovered that this is incorrect (incidentally, the order of the > deleted files here below is not alphabetical?!): > >> f+++++++++ A/B/folder1/file1.mkv >> f+++++++++ A/B/folder1/file2.mkv > *deleting A/C/file3.tex > *deleting A/C/file4.pdf > *deleting A/C/file5.txt > cd+++++++++ A/B/folder2/ >> f+++++++++ A/B/folder2/file6.html > > Is this expected? Reading the manual (section about inductive recursion) > I would think that the only case where rsync jumps unfinished dirs would > be the creation of empty dirs. > > But here's the real question: is my hypothesis correct when we restrict > to just lines starting by >, and also to just lines which start by > *deleting? In other words, does the sender never jump folder and back, > and same the receiver (but combined they might, as shown above)? > > I would grately appreciate insights. Please, let me know! > > Thanks, > BP > > -----BEGIN PGP SIGNATURE----- iF0EARECAB0WIQSHERqysePm7S8yuR9UoLWOVtABBwUCZ4kUigAKCRBUoLWOVtAB B9zRAJ9QzHtrrEFTP9ME/oFg2DmQoK23hgCfYxx+fpg4lLKjIFXsomPXw0dVYM8= =lGQP -----END PGP SIGNATURE----- -- Please use reply-all for most replies to avoid omitting the mailing list. To unsubscribe or change options: https://lists.samba.org/mailman/listinfo/rsync Before posting, read: http://www.catb.org/~esr/faqs/smart-questions.html