samba-bugs at samba.org
2014-Aug-26 17:01 UTC
[Bug 10785] New: [PATCH] Add a flag to use numeric sort
https://bugzilla.samba.org/show_bug.cgi?id=10785 Summary: [PATCH] Add a flag to use numeric sort Product: rsync Version: 3.1.1 Platform: All OS/Version: All Status: NEW Severity: normal Priority: P5 Component: core AssignedTo: wayned at samba.org ReportedBy: rom at rom1v.com QAContact: rsync-qa at samba.org Created attachment 10229 --> https://bugzilla.samba.org/attachment.cgi?id=10229 the patch I need to sync a lot of files with non-zero-padded numbered filenames. I would like them to be transferred in order, to be able to use "partial" transfers (it takes a lot of time to transfer the whole data). My concrete need is to rsync duplicity backups. Let's say I have 21 files. For now, they are transferred in that order : duplicity-full.20140531T230029Z.vol1.difftar.gpg duplicity-full.20140531T230029Z.vol10.difftar.gpg duplicity-full.20140531T230029Z.vol11.difftar.gpg duplicity-full.20140531T230029Z.vol12.difftar.gpg duplicity-full.20140531T230029Z.vol13.difftar.gpg duplicity-full.20140531T230029Z.vol14.difftar.gpg duplicity-full.20140531T230029Z.vol15.difftar.gpg duplicity-full.20140531T230029Z.vol16.difftar.gpg duplicity-full.20140531T230029Z.vol17.difftar.gpg duplicity-full.20140531T230029Z.vol18.difftar.gpg duplicity-full.20140531T230029Z.vol19.difftar.gpg duplicity-full.20140531T230029Z.vol2.difftar.gpg duplicity-full.20140531T230029Z.vol20.difftar.gpg duplicity-full.20140531T230029Z.vol21.difftar.gpg duplicity-full.20140531T230029Z.vol3.difftar.gpg duplicity-full.20140531T230029Z.vol4.difftar.gpg duplicity-full.20140531T230029Z.vol5.difftar.gpg duplicity-full.20140531T230029Z.vol6.difftar.gpg duplicity-full.20140531T230029Z.vol7.difftar.gpg duplicity-full.20140531T230029Z.vol8.difftar.gpg duplicity-full.20140531T230029Z.vol9.difftar.gpg This is not good, because if the transfer is partial, they are not exploitable (I have to sync all files 10 to 19 ? and 100 to 199, 1000 to 1999 ? before transferring file 2). Thus, I added a --numeric-sort (-N) option to rsync, to transfer the files in the expected order. Patch attached. Feedbacks welcome. -- Configure bugmail: https://bugzilla.samba.org/userprefs.cgi?tab=email ------- You are receiving this mail because: ------- You are the QA contact for the bug.
samba-bugs at samba.org
2014-Aug-26 21:43 UTC
[Bug 10785] [PATCH] Add a flag to use numeric sort
https://bugzilla.samba.org/show_bug.cgi?id=10785 rom at rom1v.com changed: What |Removed |Added ---------------------------------------------------------------------------- Attachment #10229|0 |1 is obsolete| | --- Comment #1 from rom at rom1v.com 2014-08-26 21:43:38 UTC --- Created attachment 10230 --> https://bugzilla.samba.org/attachment.cgi?id=10230 the patch (v2) An explicit 'int' return type was missing for must_numsort() the patch v1 added. The patch v2 only adds this 'int' (compared to patch v1). -- Configure bugmail: https://bugzilla.samba.org/userprefs.cgi?tab=email ------- You are receiving this mail because: ------- You are the QA contact for the bug.
Dan Stromberg
2014-Aug-26 23:21 UTC
[Bug 10785] New: [PATCH] Add a flag to use numeric sort
On Tue, Aug 26, 2014 at 10:01 AM, <samba-bugs at samba.org> wrote:> https://bugzilla.samba.org/show_bug.cgi?id=10785 > > Summary: [PATCH] Add a flag to use numeric sort > Product: rsync > Version: 3.1.1 > Platform: All > OS/Version: All > Status: NEW > Severity: normal > Priority: P5 > Component: core > AssignedTo: wayned at samba.org > ReportedBy: rom at rom1v.com > QAContact: rsync-qa at samba.org > > > Created attachment 10229 > --> https://bugzilla.samba.org/attachment.cgi?id=10229 > the patch > > I need to sync a lot of files with non-zero-padded numbered filenames.I wonder if --files-from would do what you want, if combined with GNU sort or similar? http://stackoverflow.com/questions/9766284/rsync-read-input-from-a-file-and-sync-accordingly
samba-bugs at samba.org
2014-Sep-12 07:43 UTC
[Bug 10785] [PATCH] Add a flag to use numeric sort
https://bugzilla.samba.org/show_bug.cgi?id=10785 --- Comment #2 from rom at rom1v.com 2014-09-12 07:43:31 UTC --- Arf, it breaks file selection and file content under some conditions (remote transfer and partial sync ? when some files are already present). So (at least for now), I close this bug/patch. -- Configure bugmail: https://bugzilla.samba.org/userprefs.cgi?tab=email ------- You are receiving this mail because: ------- You are the QA contact for the bug.
samba-bugs at samba.org
2014-Sep-12 07:44 UTC
[Bug 10785] [PATCH] Add a flag to use numeric sort
https://bugzilla.samba.org/show_bug.cgi?id=10785 rom at rom1v.com changed: What |Removed |Added ---------------------------------------------------------------------------- Status|NEW |RESOLVED Resolution| |INVALID -- Configure bugmail: https://bugzilla.samba.org/userprefs.cgi?tab=email ------- You are receiving this mail because: ------- You are the QA contact for the bug.