Re: include/exclude problems

2010-03-26 Thread Benjamin R. Haskell
On Thu, 25 Mar 2010, Vitaly V. Ganusov wrote:

 However, it seems like a very messy way to sync a given file (by 
 excluding bunch of other files that are not needed). Would you suggest 
 a better way?  Could you suggest a simple way/script to generate such 
 a file (see attached) with only a few files being included in the 
 rsync line?
 

If you want to transfer only certain files, just list them in a file (relative
to the source directory), and use the --files-from= argument.

E.g., create the file 'test.files'
 test.files =
.mozilla-thunderbird/afc5fv2p.default/abook.mab
.mozilla-thunderbird/afc5fv2p.default/storage.sdb
.mozilla/firefox/5dpdgl81.default/bookmarks.html
.mozilla/firefox/5dpdgl81.default/places.sqlite
=

Then, using your example: (\'s to avoid mail splitting)

rsync -aunvz --delete -e ssh --files-from=test.files \
 /home/vitaly/ \
 utk:/home/vitaly/

Unless I'm mistaken, you can include directories.

If that's not what you meant (a list of specific files), you might just 
be interested to know that you can use '*' to exclude everything not 
already included:

e.g., where you had:

 + .mozilla-thunderbird/
 + .mozilla-thunderbird/afc5fv2p.default/
 + .mozilla-thunderbird/afc5fv2p.default/abook.mab
 + .mozilla-thunderbird/afc5fv2p.default/storage.sdb
 - .mozilla-thunderbird/afc5fv2p.default/ImapMail
 - .mozilla-thunderbird/afc5fv2p.default/Mail
 - .mozilla-thunderbird/afc5fv2p.default/lock
 - .mozilla-thunderbird/afc5fv2p.default/extensions

You could simplify that to:

+ .mozilla-thunderbird/
+ .mozilla-thunderbird/afc5fv2p.default/
+ .mozilla-thunderbird/afc5fv2p.default/abook.mab
+ .mozilla-thunderbird/afc5fv2p.default/storage.sdb
- .mozilla-thunderbird/afc5fv2p.default/*

(The last line *doesn't* exclude abook.mab or storage.sdb)

-- 
Best,
Ben
-- 
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


Re: Incremental recursion not working

2010-03-26 Thread Gerald Holl
Paul Slootman wrote:
 On Wed 24 Mar 2010, Gerald Holl wrote:
 
 Maybe it's because of too many files? The file list consists of
 approx. 450.000 items.
 
 Incremental recursion works per directory.
 If all those 450.000 files are in one directory, then incremental
 recursion won't help.

The files are in different directories.

 The number of items isn't the problem because rsync would first have to
 find all the files before deciding to use incrmental or not by your
 reasoning, which would sort of contradict the purpose of incremental
 recursion :-)

Ok, I see.
Well, if the number of items isn't the problem, then, why is it not working?

I tried to debug by using the verbose flag:
[client] add_rule(- backup-scripts)
FILE_STRUCT_LEN=16, EXTRA_LEN=4
cmd=ssh -p 1234 machine=myhost user=test path=/source/
cmd[0]=ssh cmd[1]=-p cmd[2]=1234 cmd[3]=-l cmd[4]=test cmd[5]=myhost
cmd[6]=rsync cmd[7]=--server cmd[8]=--sender cmd[9]=-vvvLogtprze.iL
cmd[10]=--numeric-ids cmd[11]=. cmd[12]=/source/
opening connection using: ssh -p 1234 -l test myhost rsync --server
--sender -vvvLogtprze.iL --numeric-ids . /source/
note: iconv_open(UTF-8, UTF-8) succeeded.
(Client) Protocol versions: remote=30, negotiated=30
receiving file list ...
recv_file_name(source)
recv_file_name 


cheers,
Gerald
-- 
http://holl.co.at
-- 
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


DO NOT REPLY [Bug 7057] Buffer overflow when sending a file with long name

2010-03-26 Thread samba-bugs
https://bugzilla.samba.org/show_bug.cgi?id=7057


way...@samba.org changed:

   What|Removed |Added

 Status|NEW |RESOLVED
 Resolution||FIXED




--- Comment #9 from way...@samba.org  2010-03-26 19:02 CST ---
The latest patch should fix the bug, though it should really call closedir(d)
before returning.

I've chosen to fix the issue in a different manner that will make rsync only
output about files inside the directory that it cannot send (since the dir
itself is short enough that we can send it).  I also fixed up the output so
that it reports the real filenames (not truncated filenames) and mentions how
big the overflow actually is.

Thanks for the analysis/patch/reproducer!


-- 
Configure bugmail: https://bugzilla.samba.org/userprefs.cgi?tab=email
--- You are receiving this mail because: ---
You are the QA contact for the bug, or are watching the QA contact.
-- 
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


DO NOT REPLY [Bug 7057] Buffer overflow when sending a file with long name

2010-03-26 Thread samba-bugs
https://bugzilla.samba.org/show_bug.cgi?id=7057





--- Comment #10 from way...@samba.org  2010-03-26 19:06 CST ---
Created an attachment (id=5551)
 -- (https://bugzilla.samba.org/attachment.cgi?id=5551action=view)
My fix for the issue.

Here's the patch that was committed to both the b3.0.x and master branches.


-- 
Configure bugmail: https://bugzilla.samba.org/userprefs.cgi?tab=email
--- You are receiving this mail because: ---
You are the QA contact for the bug, or are watching the QA contact.
-- 
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


DO NOT REPLY [Bug 7057] Buffer overflow when sending a file with long name

2010-03-26 Thread samba-bugs
https://bugzilla.samba.org/show_bug.cgi?id=7057





--- Comment #11 from way...@samba.org  2010-03-26 19:16 CST ---
Created an attachment (id=5553)
 -- (https://bugzilla.samba.org/attachment.cgi?id=5553action=view)
Vary the final dir len (creates 3 final dirs) and puts 3 files in those dirs
with varying name lengths.

My version of the make-chain script puts the files 1 22 and 333 into the
final dir, and also into 2 other dirs (so they are 13, 14, and 15 chars long). 
This results in:

13-char/1succeeds
13-char/22   fails by 1
13-char/333  fails by 2
14-char/1fails by 1
14-char/22   fails by 2
14-char/333  fails by 3
15-char/1fails by 2
15-char/22   fails by 3
15-char/333  fails by 4


-- 
Configure bugmail: https://bugzilla.samba.org/userprefs.cgi?tab=email
--- You are receiving this mail because: ---
You are the QA contact for the bug, or are watching the QA contact.
-- 
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


Re: Incremental recursion not working

2010-03-26 Thread Wayne Davison
On Fri, Mar 26, 2010 at 12:33 AM, Gerald Holl ger...@holl.co.at wrote:

 cmd[9]=-vvvLogtprze.iL


The presence of the 'i' in the -e.iL option that was sent means that the
client believes that incremental recurse is possible.  The server side must
be sending back a flag that indicates that it believes that it is not.  I'd
suggest looking to see if the rsync on the path is a script (or alias)
that tries to force extra options (such as --delay-updates or
--prune-empty-dirs) or something that strips away the -e.iL option.  You
could work around such a situation by specifying --rsync-path=/usr/bin/rsync
(or what path you need).  If none of that works, you could add some
fprintf(stderr, ...\n) statements to the set_allow_inc_recurse() routine
in compat.c to see what is triggering the allow_inc_recurse = 0 setting.
 Something like this:

   client_info = shell_cmd ? shell_cmd : ;

   fprintf(stderr, [%s] allow_inc_recurse=%d, recurse=%d, use_qsort=%d,
delete_before=%d, delete_after=%d, delay_updates=%d, prune_empty_dirs=%d,
client_info='%s'\n, who_am_i(), allow_inc_recurse, recurse, use_qsort,
delete_before, delete_after, delay_updates, prune_empty_dirs, client_info);
/* added */

   if (!recurse || use_qsort)
   allow_inc_recurse = 0;

..wayne..
-- 
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

[SCM] The rsync repository. branch, b3.0.x, updated. v3.0.7-1-g2ecd8b7

2010-03-26 Thread Rsync CVS commit messages
This is an automated email from the git hooks/post-receive script. It was
generated because a ref change was pushed to the repository containing
the project The rsync repository..

The branch, b3.0.x has been updated
   via  2ecd8b7cd27f692d2832dc6908ca6a6fe1d310fe (commit)
  from  54f00c3f89fc147f2f9cba89d26a5bb1d20e783b (commit)

Those revisions listed above that are new to this repository have
not appeared on any other notification email; so we list those
revisions in full, below.

- Log -
commit 2ecd8b7cd27f692d2832dc6908ca6a6fe1d310fe
Author: Wayne Davison way...@samba.org
Date:   Fri Mar 26 16:56:40 2010 -0700

Fix directory-length overflow bug (7057).

---

Summary of changes:
 flist.c |   20 ++--
 1 files changed, 14 insertions(+), 6 deletions(-)


hooks/post-receive
--
The rsync repository.
___
rsync-cvs mailing list
rsync-cvs@lists.samba.org
https://lists.samba.org/mailman/listinfo/rsync-cvs


[SCM] The rsync repository. branch, master, updated. v3.0.3-326-g9a7532e

2010-03-26 Thread Rsync CVS commit messages
This is an automated email from the git hooks/post-receive script. It was
generated because a ref change was pushed to the repository containing
the project The rsync repository..

The branch, master has been updated
   via  9a7532e516a6153ba6c59a59c329345509536a98 (commit)
  from  9b594a530ffdac3a7ec919fe891bda154fd297b0 (commit)

Those revisions listed above that are new to this repository have
not appeared on any other notification email; so we list those
revisions in full, below.

- Log -
commit 9a7532e516a6153ba6c59a59c329345509536a98
Author: Wayne Davison way...@samba.org
Date:   Fri Mar 26 16:56:40 2010 -0700

Fix directory-length overflow bug (7057).

---

Summary of changes:
 flist.c |   20 ++--
 1 files changed, 14 insertions(+), 6 deletions(-)


hooks/post-receive
--
The rsync repository.
___
rsync-cvs mailing list
rsync-cvs@lists.samba.org
https://lists.samba.org/mailman/listinfo/rsync-cvs