[Bug 11909] Doc patch for INCLUDE/EXCLUDE PATTERN RULES

2020-07-26 Thread just subscribed for rsync-qa from bugzilla via rsync
https://bugzilla.samba.org/show_bug.cgi?id=11909

Wayne Davison  changed:

   What|Removed |Added

 Status|NEW |RESOLVED
 Resolution|--- |FIXED

--- Comment #1 from Wayne Davison  ---
An improvement based on your changes was made a while back. Thanks!

-- 
You are receiving this mail because:
You are the QA Contact for the bug.
-- 
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


[Bug 11909] New: Doc patch for INCLUDE/EXCLUDE PATTERN RULES

2016-05-07 Thread samba-bugs
https://bugzilla.samba.org/show_bug.cgi?id=11909

Bug ID: 11909
   Summary: Doc patch for INCLUDE/EXCLUDE PATTERN RULES
   Product: rsync
   Version: 3.1.2
  Hardware: All
OS: All
Status: NEW
  Severity: enhancement
  Priority: P5
 Component: core
  Assignee: way...@samba.org
  Reporter: k...@meme.com
QA Contact: rsync...@samba.org

Created attachment 12087
  --> https://bugzilla.samba.org/attachment.cgi?id=12087=edit
Patch to rsync.yo

Doc patch (v2) as sent to mailing list vis INCLUDE/EXCLUDE PATTERN RULES
and recursive (-r) copy.

Seems like a good idea to put it in bugzilla so it does not get lost.

-- 
You are receiving this mail because:
You are the QA Contact for the bug.

-- 
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: rsync very slow with large include/exclude file list

2015-06-15 Thread ray vantassle
I investigated the rsync code and found the reason why.
For every file in the source, it searches the entire filter-list looking to
see if that filename is on the exclude/include list.  Most aren't, so it
compares (350K - 72K) * 72K names (the non-listed files) plus (72K * 72K/2)
names (the ones that are listed), for a total of about  22,608,000,000
strcmp's.  That's 22 BILLION comparisons. (I may have left off a zero
there, it might be 220 B).

I'm working on a fix to improve this.  The first phase was to just improve
the existing code without changing the methodology.
The set I've been testing with is local-local machine, dry-run, 216K files
in the source directory, 25,000 files in the exclude-from list.
The original rsync takes 488 seconds.
The improved code takes 300 seconds.

The next phase was to improve the algorithm of handling large
filter_lists.  Change the unsorted linear search to a sorted binary search
(skiplist).
This improved code takes 2 seconds.

The original code does 4,492,304,682 strcmp's.
The fully improved code does 6,472,564.  98.5% fewer.

I am cleaning up the code and will submit a patchfile soon.
-- 
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: rsync very slow with large include/exclude file list

2015-06-15 Thread Ken Chase
This is similar to using fuzzy / -y in a large directory. O(n^2) behaviour
occurs and can be incredibly slow. No caching of md5's for the directory
occurs, it would seem (or even so, there are O(N^2) comparisons).

/kc


On Mon, Jun 15, 2015 at 06:02:14PM -0500, ray vantassle said:
 I investigated the rsync code and found the reason why.
 For every file in the source, it searches the entire filter-list looking
 to see if that filename is on the exclude/include list.** Most aren't, so
 it compares (350K - 72K) * 72K names (the non-listed files) plus (72K *
 72K/2) names (the ones that are listed), for a total of about**
 22,608,000,000 strcmp's.** That's 22 BILLION comparisons. (I may have left
 off a zero there, it might be 220 B).
  
 I'm working on a fix to improve this.** The first phase was to just
 improve the existing code without changing the methodology.
 The set I've been testing with is local-local machine, dry-run, 216K files
 in the source directory, 25,000 files in the exclude-from list.
 The original rsync takes 488 seconds.
 The improved code takes 300 seconds.
  
 The next phase was to improve the algorithm of handling large
 filter_lists.** Change the unsorted linear search to a sorted binary
 search (skiplist).
 This improved code takes 2 seconds.
  
 The original code does 4,492,304,682 strcmp's.
 The fully improved code does 6,472,564.** 98.5% fewer.
  
 I am cleaning up the code and will submit a patchfile soon.

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


-- 
Ken Chase - k...@heavycomputing.ca skype:kenchase23 +1 416 897 6284 Toronto 
Canada
Heavy Computing - Clued bandwidth, colocation and managed linux VPS @151 Front 
St. W.
-- 
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


rsync very slow with large include/exclude file list

2015-06-15 Thread ray vantassle
I have a sensor collector system (very low-powered slow ARM cpu), and
another system which daily pulls the data files from it for processing.
There are about 1000 new files each day.  As part of the processing it
decides that certain of the files are of no interest, and adds them to an
exclude file, which is used in future rsyncs.  No files are ever deleted
from the source system, just the receiver system.  All done in cron jobs at
night.

After about 18 months, there are about 350,000 files and the exclude list
has about 72,000 filenames.  I recently ran the pulling script manually and
thought the system must have died.
Rsync took almost 3 hours.  Trying to narrow down the problem, I removed
the --exclude-file= option from the rsync command -- and it took only 16
minutes -- including the time to transfer the 72,000 files that are of no
interest.
 (con't)
-- 
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

[Bug 10638] New: Add include/exclude files by mime type

2014-05-27 Thread samba-bugs
https://bugzilla.samba.org/show_bug.cgi?id=10638

   Summary: Add include/exclude files by mime type
   Product: rsync
   Version: 3.1.1
  Platform: All
OS/Version: All
Status: NEW
  Severity: enhancement
  Priority: P5
 Component: core
AssignedTo: way...@samba.org
ReportedBy: krafczyk.matt...@gmail.com
 QAContact: rsync...@samba.org


As mentioned here: https://lists.samba.org/archive/rsync/2009-June/023424.html

it would be good to have an include or exclude files by mime type option if the
platform supports it.

What are the hurdles to implement such functionality?

-- 
Configure bugmail: https://bugzilla.samba.org/userprefs.cgi?tab=email
--- You are receiving this mail because: ---
You are the QA contact for the bug.
-- 
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: do not update dirtimes on --include='*/' --exclude='*'

2013-03-12 Thread Francis . Montagnac

Hi.

On Mon, 11 Mar 2013 23:17:06 +0100 Mark Casey wrote:

 On 3/11/2013 4:18 PM, Mark Casey wrote:
...
 rsync -nav --no-t --numeric-ids --relative --include='*/' --exclude='*' \
   /media/mnt/files /media/backups/mnt/
...
 I was wrong. The command I listed is working after all, I just wasn't 
 evaluating the results correctly. Sorry for the extra noise.

Using --omit-dir-times instead of --no-t would also work (I think)
while preserving the modtime of the new or renamed directories.

-- 
francis.montag...@inria.fr
-- 
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 update dirtimes on --include='*/' --exclude='*'

2013-03-11 Thread Mark Casey
Hello,

I'm trying to do something that did not sound difficult, but no option I've
 tried seems to be working. I apologize in advance if I'm missing something 
obvious.

I need to sync only directories from one tree to a similar, but older tree
 *without* updating the modtimes of directories that already exist in the
 destination. Or phrased the other way, I want to entirely skip transferring or
 updating directories that already exist in the destination, without regard to
 modtime. Right now I'm using something along the lines of:

rsync -nav --no-t --numeric-ids --relative --include='*/' --exclude='*' \
 /media/mnt/files /media/backups/mnt/

I've also tried messing with --checksum, --ignore-existing, and --size-only to
 get rsync to ignore modtimes but I think most of what I'm trying is intended to
 work on files and not dirs.

Any insights?

In case you want to know... The use case is that I'm trying to get rsnapshot to
 work with rsync --detect-renamed, and so need to pre-populate new directories
 to the destination to get partial dir to operate for the rename detection...

https://lists.samba.org/archive/rsync/2009-November/024225.html

Since rsnapshot calls the preexec script and *then* rotates you end up adding
 the dirs to the previous snapshot too even though they did not exist when it
 was taken. I'm working on a specific method that would avoid this.

TIA,
Mark

-- 
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: do not update dirtimes on --include='*/' --exclude='*'

2013-03-11 Thread Mark Casey

On 3/11/2013 4:18 PM, Mark Casey wrote:

Hello,

I'm trying to do something that did not sound difficult, but no option I've
  tried seems to be working. I apologize in advance if I'm missing something
obvious.

I need to sync only directories from one tree to a similar, but older tree
  *without* updating the modtimes of directories that already exist in the
  destination. Or phrased the other way, I want to entirely skip transferring or
  updating directories that already exist in the destination, without regard to
  modtime. Right now I'm using something along the lines of:

rsync -nav --no-t --numeric-ids --relative --include='*/' --exclude='*' \
  /media/mnt/files /media/backups/mnt/

I've also tried messing with --checksum, --ignore-existing, and --size-only to
  get rsync to ignore modtimes but I think most of what I'm trying is intended 
to
  work on files and not dirs.

Any insights?

In case you want to know... The use case is that I'm trying to get rsnapshot to
  work with rsync --detect-renamed, and so need to pre-populate new directories
  to the destination to get partial dir to operate for the rename detection...

https://lists.samba.org/archive/rsync/2009-November/024225.html

Since rsnapshot calls the preexec script and *then* rotates you end up adding
  the dirs to the previous snapshot too even though they did not exist when it
  was taken. I'm working on a specific method that would avoid this.

TIA,
Mark



I was wrong. The command I listed is working after all, I just wasn't 
evaluating the results correctly. Sorry for the extra noise.


Thank you,
Mark

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


Understand include exclude script

2012-10-19 Thread Marc
hi

i use a script to backup my homedir, that work but there are somes things i 
don't really understand.

here my script

rsync -arv --delete --prune-empty-dirs --include-from=include.txt 
--exclude-from=exclude  /home/bob /media/usbkey

include.txt file
+ .Skype/***
+ .local/
+ .local/share/
+ .local/share/local-mail/***
+ .mozilla/***
- .**

exclude.txt file
Desktop/
Download/
.*

I have a lot of folder in my home: music, video, Document.

I undersdand  that it script copy skype, local-mail and mozilla content.
-.** means exclude other?

and for exlude file: exclude Desktop, Download and .* means all other?

also why music, video and document are copied, is there something in the script 
who said to copy it?

thanks
-- 
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: Understand include exclude script

2012-10-19 Thread Kevin Korb
-BEGIN PGP SIGNED MESSAGE-
Hash: SHA1

The - .** and .* lines are both excluding all .files and .directories
except for the ones you specifically included.  For easyness of
reading I would suggest you merge the two files together with
something like:

+ .Skype/***
+ .local/
+ .local/share/
+ .local/share/local-mail/***
+ .mozilla/***
- - .*
- - Desktop/
- - Download/

Though I don't actually suggest excluding .* since there are lots of
important configuration files that you will be excluding that way.

On 10/19/12 08:28, Marc wrote:
 hi
 
 i use a script to backup my homedir, that work but there are somes
 things i don't really understand.
 
 here my script
 
 rsync -arv --delete --prune-empty-dirs --include-from=include.txt
 --exclude-from=exclude  /home/bob /media/usbkey
 
 include.txt file + .Skype/*** + .local/ + .local/share/ +
 .local/share/local-mail/*** + .mozilla/*** - .**
 
 exclude.txt file Desktop/ Download/ .*
 
 I have a lot of folder in my home: music, video, Document.
 
 I undersdand  that it script copy skype, local-mail and mozilla
 content. -.** means exclude other?
 
 and for exlude file: exclude Desktop, Download and .* means all
 other?
 
 also why music, video and document are copied, is there something
 in the script who said to copy it?
 
 thanks
 

- -- 
~*-,._.,-*~'`^`'~*-,._.,-*~'`^`'~*-,._.,-*~'`^`'~*-,._.,-*~'`^`'~*-,._.,-*~
Kevin Korb  Phone:(407) 252-6853
Systems Administrator   Internet:
FutureQuest, Inc.   ke...@futurequest.net  (work)
Orlando, Floridak...@sanitarium.net (personal)
Web page:   http://www.sanitarium.net/
PGP public key available on web site.
~*-,._.,-*~'`^`'~*-,._.,-*~'`^`'~*-,._.,-*~'`^`'~*-,._.,-*~'`^`'~*-,._.,-*~
-BEGIN PGP SIGNATURE-
Version: GnuPG v2.0.19 (GNU/Linux)
Comment: Using GnuPG with Mozilla - http://www.enigmail.net/

iEYEARECAAYFAlCBfUEACgkQVKC1jlbQAQczwgCfT9KM9A3s3i5aPMJvP0jiBWlX
NQUAoK9VHJikqljUsaWzVQe9X/ScdenU
=g7rR
-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


Re: Understand include exclude script

2012-10-19 Thread Marc
if i merge this config, i need to put it in include file?
i tried and it copied all file and folder


also why in my old script some folder like  music, video and document  was 
copied while i don't wrote to do it?




- Original Message -
From: Kevin Korb k...@sanitarium.net
To: rsync@lists.samba.org
Cc: 
Sent: Friday, October 19, 2012 6:18:09 PM
Subject: Re: Understand include exclude script

-BEGIN PGP SIGNED MESSAGE-
Hash: SHA1

The - .** and .* lines are both excluding all .files and .directories
except for the ones you specifically included.  For easyness of
reading I would suggest you merge the two files together with
something like:

+ .Skype/***
+ .local/
+ .local/share/
+ .local/share/local-mail/***
+ .mozilla/***
- - .*
- - Desktop/
- - Download/

Though I don't actually suggest excluding .* since there are lots of
important configuration files that you will be excluding that way.



On 10/19/12 08:28, Marc wrote:
 hi
 
 i use a script to backup my homedir, that work but there are somes
 things i don't really understand.
 
 here my script
 
 rsync -arv --delete --prune-empty-dirs --include-from=include.txt
 --exclude-from=exclude  /home/bob /media/usbkey
 
 include.txt file + .Skype/*** + .local/ + .local/share/ +
 .local/share/local-mail/*** + .mozilla/*** - .**
 
 exclude.txt file Desktop/ Download/ .*
 
 I have a lot of folder in my home: music, video, Document.
 
 I undersdand  that it script copy skype, local-mail and mozilla
 content. -.** means exclude other?
 
 and for exlude file: exclude Desktop, Download and .* means all
 other?
 
 also why music, video and document are copied, is there something
 in the script who said to copy it?
 
 thanks
 

- -- 
~*-,._.,-*~'`^`'~*-,._.,-*~'`^`'~*-,._.,-*~'`^`'~*-,._.,-*~'`^`'~*-,._.,-*~
    Kevin Korb            Phone:    (407) 252-6853
    Systems Administrator        Internet:
    FutureQuest, Inc.        ke...@futurequest.net  (work)
    Orlando, Florida        k...@sanitarium.net (personal)
    Web page:            http://www.sanitarium.net/
    PGP public key available on web site.
~*-,._.,-*~'`^`'~*-,._.,-*~'`^`'~*-,._.,-*~'`^`'~*-,._.,-*~'`^`'~*-,._.,-*~
-BEGIN PGP SIGNATURE-
Version: GnuPG v2.0.19 (GNU/Linux)
Comment: Using GnuPG with Mozilla - http://www.enigmail.net/

iEYEARECAAYFAlCBfUEACgkQVKC1jlbQAQczwgCfT9KM9A3s3i5aPMJvP0jiBWlX
NQUAoK9VHJikqljUsaWzVQe9X/ScdenU
=g7rR
-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

-- 
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: Understand include exclude script

2012-10-19 Thread Kevin Korb
-BEGIN PGP SIGNED MESSAGE-
Hash: SHA1

When you use the + and - syntax it doesn't matter if you call it an
- --include-from=file or an --exclude-from=file.  Those only matter if
the list is a plain list of patterns without the + or -.

The only things you excluded are .* Desktop/ and Download/ not
anything like music or video.

By default everything is included.  The list of excludes override that
by removing some things from the list.  The list of includes override
those excludes putting some things back into the list.  So, if you
make a bunch of +/- patterns anything that isn't matched by any of the
patterns will be included.

If you want to reverse that and have only things that you specifically
include be copied then your list needs to end with:
- - *
That will exclude everything that hasn't been previously included.
Note that you will probably also want:
+ */
somewhere near the top.

On 10/19/12 16:34, Marc wrote:
 if i merge this config, i need to put it in include file? i tried
 and it copied all file and folder
 
 
 also why in my old script some folder like  music, video and
 document  was copied while i don't wrote to do it?
 
 
 
 
 - Original Message - From: Kevin Korb k...@sanitarium.net 
 To: rsync@lists.samba.org Cc: Sent: Friday, October 19, 2012
 6:18:09 PM Subject: Re: Understand include exclude script
 
 The - .** and .* lines are both excluding all .files and
 .directories except for the ones you specifically included.  For
 easyness of reading I would suggest you merge the two files
 together with something like:
 
 + .Skype/*** + .local/ + .local/share/ +
 .local/share/local-mail/*** + .mozilla/*** - .* - Desktop/ -
 Download/
 
 Though I don't actually suggest excluding .* since there are lots
 of important configuration files that you will be excluding that
 way.
 
 
 
 On 10/19/12 08:28, Marc wrote:
 hi
 
 i use a script to backup my homedir, that work but there are
 somes things i don't really understand.
 
 here my script
 
 rsync -arv --delete --prune-empty-dirs
 --include-from=include.txt --exclude-from=exclude  /home/bob
 /media/usbkey
 
 include.txt file + .Skype/*** + .local/ + .local/share/ + 
 .local/share/local-mail/*** + .mozilla/*** - .**
 
 exclude.txt file Desktop/ Download/ .*
 
 I have a lot of folder in my home: music, video, Document.
 
 I undersdand  that it script copy skype, local-mail and mozilla 
 content. -.** means exclude other?
 
 and for exlude file: exclude Desktop, Download and .* means all 
 other?
 
 also why music, video and document are copied, is there
 something in the script who said to copy it?
 
 thanks
 
 
 

- -- 
~*-,._.,-*~'`^`'~*-,._.,-*~'`^`'~*-,._.,-*~'`^`'~*-,._.,-*~'`^`'~*-,._.,-*~
Kevin Korb  Phone:(407) 252-6853
Systems Administrator   Internet:
FutureQuest, Inc.   ke...@futurequest.net  (work)
Orlando, Floridak...@sanitarium.net (personal)
Web page:   http://www.sanitarium.net/
PGP public key available on web site.
~*-,._.,-*~'`^`'~*-,._.,-*~'`^`'~*-,._.,-*~'`^`'~*-,._.,-*~'`^`'~*-,._.,-*~
-BEGIN PGP SIGNATURE-
Version: GnuPG v2.0.19 (GNU/Linux)
Comment: Using GnuPG with Mozilla - http://www.enigmail.net/

iEYEARECAAYFAlCBu9kACgkQVKC1jlbQAQerZwCfZ+56Q0Hk9NPToUArEsKRApBS
ReAAoKCQvali7HEgy0ZI3SIWyb5p84kO
=Kpyt
-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


SOLVED: Re: include/exclude: I miss the point

2010-09-12 Thread Hans Troost
Hi Michal,

(hope this mail is short enough for the list, previous one bounced: too 
big)

Read, re-read, read again both your mail and the rsync-documentation 
(again) and think I get it now.

First, regarding your comments (not all):

1. you are right, the .kabc\-files were missing (did not check it 
properly). Now I have them (see my solution below)

rest of your comments let me understand what I read in the manual.
One remark: the Exclude .mybackup/backup*.log.* is not redundant, due to 
the Include .mybackup. The .mozilla/extensions was redundant.

2 Excluding the [A-Z] and [a-z] works when specifying this: hans/[A-Z]* 
etc.

Now I have the following which works perfect for me (test -version):

rsync command:
rsync -n -v -axhhX --no-perms --omit-dir-times --stats\
 --backup --backup-dir=`date +%Y-%m-%d`/updated --suffix=.`date +%H%M`\
 --delete --delete-excluded\
 --backup-dir-dels=`date +%Y-%m-%d`/deleted --suffix-dels=.`date +%H%M`\
 --log-file=/home/hans/.mybackup/backup-test.log.`date +%Y%m%d`-`date 
+%H%M`\
 --include-from=/home/hans/.mybackup/include.txt\
 --exclude-from=/home/hans/.mybackup/exclude.txt\
   /home/hans /mnt/backup/test/

I herewith attach both the include.txt and exclude .txt and the listing of 
backed-up files.


Best regards,

Hans Troost
#
# to get KAdressbook entries + distribution lists
#
.kde4/
.kde4/share/
.kde4/share/apps/
.kde4/share/apps/kabc/
.kde4/share/apps/kabc/distlists
.kde4/share/apps/kabc/std.vcf
#
# to get firefox bookmarks
#
.mozilla/
.mozilla/firefox/
.mozilla/firefox/plp6wzjm.default/
.mozilla/firefox/plp6wzjm.default/bookmarkbackups/
.mozilla/firefox/plp6wzjm.default/bookmarkbackups/*
#
# to get the backup-scripts and associated files like this
#
.mybackup

.*
.mybackup/backup*.log.*
.mozilla/*
.mozilla/firefox/*
.mozilla/firefox/plp6wzjm.default/*
.kde4/*
.kde4/share/*
.kde4/share/apps/*
.kde4/share/apps/kabc/*
*.*~
Desktop
Downloads
Movies
Music
Pictures
tmp
Videos
#
# for testing purposes only will be commented out on real use
# hans/[a-z]*
# hans/[A-Z]*
# hans/2*/mnt/backup/test:
total 0
drwxr-xr-x 2 hans hans 0 2010-09-11 21:08 ./
drwxr-xr-x 6 hans hans 0 2010-09-11 21:08 ../
drwxr-xr-x 4 hans hans 0 2010-09-11 21:08 hans/


/mnt/backup/test/hans:
total 0
drwxr-xr-x 4 hans hans 0 2010-09-11 21:08 ./
drwxr-xr-x 2 hans hans 0 2010-09-11 21:08 ../
drwxr-xr-x 2 hans hans 0 2010-09-11 21:08 .kde4/
drwxr-xr-x 2 hans hans 0 2010-09-11 21:08 .mozilla/
drwxr-xr-x 1 hans hans 0 2010-09-11 21:08 .mybackup/


/mnt/backup/test/hans/.kde4:
total 0
drwxr-xr-x 2 hans hans 0 2010-09-11 21:08 ./
drwxr-xr-x 4 hans hans 0 2010-09-11 21:08 ../
drwxr-xr-x 2 hans hans 0 2010-09-11 21:08 share/


/mnt/backup/test/hans/.kde4/share:
total 0
drwxr-xr-x 2 hans hans 0 2010-09-11 21:08 ./
drwxr-xr-x 2 hans hans 0 2010-09-11 21:08 ../
drwxr-xr-x 2 hans hans 0 2010-09-11 21:08 apps/


/mnt/backup/test/hans/.kde4/share/apps:
total 0
drwxr-xr-x 2 hans hans 0 2010-09-11 21:08 ./
drwxr-xr-x 2 hans hans 0 2010-09-11 21:08 ../
drwxr-xr-x 1 hans hans 0 2010-09-11 21:08 kabc/


/mnt/backup/test/hans/.kde4/share/apps/kabc:
total 28
drwxr-xr-x 1 hans hans 0 2010-09-11 21:08 ./
drwxr-xr-x 2 hans hans 0 2010-09-11 21:08 ../
-rwxr-xr-x 1 hans hans   202 2010-09-11 11:55 distlists*
-rwxr-xr-x 1 hans hans 21968 2010-09-11 11:55 std.vcf*


/mnt/backup/test/hans/.mozilla:
total 0
drwxr-xr-x 2 hans hans 0 2010-09-11 21:08 ./
drwxr-xr-x 4 hans hans 0 2010-09-11 21:08 ../
drwxr-xr-x 2 hans hans 0 2010-09-11 21:08 firefox/


/mnt/backup/test/hans/.mozilla/firefox:
total 0
drwxr-xr-x 2 hans hans 0 2010-09-11 21:08 ./
drwxr-xr-x 2 hans hans 0 2010-09-11 21:08 ../
drwxr-xr-x 2 hans hans 0 2010-09-11 21:08 plp6wzjm.default/


/mnt/backup/test/hans/.mozilla/firefox/plp6wzjm.default:
total 0
drwxr-xr-x 2 hans hans 0 2010-09-11 21:08 ./
drwxr-xr-x 2 hans hans 0 2010-09-11 21:08 ../
drwxr-xr-x 1 hans hans 0 2010-09-11 21:08 bookmarkbackups/


/mnt/backup/test/hans/.mozilla/firefox/plp6wzjm.default/bookmarkbackups:
total 216
drwxr-xr-x 1 hans hans 0 2010-09-11 21:08 ./
drwxr-xr-x 2 hans hans 0 2010-09-11 21:08 ../
-rwxr-xr-x 1 hans hans 33921 2010-09-05 19:16 bookmarks-2010-09-05.json*
-rwxr-xr-x 1 hans hans 33921 2010-09-06 20:08 bookmarks-2010-09-06.json*
-rwxr-xr-x 1 hans hans 34164 2010-09-07 21:25 bookmarks-2010-09-07.json*
-rwxr-xr-x 1 hans hans 34164 2010-09-08 23:14 bookmarks-2010-09-08.json*
-rwxr-xr-x 1 hans hans 34164 2010-09-10 14:30 bookmarks-2010-09-10.json*
-rwxr-xr-x 1 hans hans 34164 2010-09-11 20:42 bookmarks-2010-09-11.json*


/mnt/backup/test/hans/.mybackup:
total 64
drwxr-xr-x 1 hans hans0 2010-09-11 21:08 ./
drwxr-xr-x 4 hans hans0 2010-09-11 21:08 ../
-rwxr-xr-x 1 hans hans  471 2010-09-10 20:44 backup-dry-run.sh*
-rwxr-xr-x 1 hans hans 1305 2010-09-08 17:06 backup-old.sh*
-rwxr-xr-x 1 hans hans  749 2010-09-10 19:43 backup.sh*
-rwxr-xr-x 1 hans hans  457 2010-09-11 20:54 backup-test.sh*
-rwxr-xr-x 1 hans hans  101 2010-09-10 20:48 exclude-old .txt*

include/exclude: I miss the point

2010-09-10 Thread Hans Troost
Hi all,

I thought I understand how include/exclude and their precedences work (I 
read the user guide about this), but I seem to miss something.

I have 2 questions about this, separated by ==

Question 1:
--
I want to exclude the hidden directories except some sub-dirs or files: 
.mybackup and its files) and the mozilla firefox bookmarks folder and its 
contents (.mozilla/firefox/plp6wzjm.default/bookmarkbackups/*)

So my exclude-files contains:
.*
.mybackup/backup.log.*
.mozilla/extensions
*.*~
Desktop
Downloads
Movies
Music
Picturestmp
Videos

the include file contains:
.kde4/share/apps/kabc/distlists
.kde4/share/apps/kabc/std.vcf
.mozilla/
.mozilla/firefox/
.mozilla/firefox/plp6wzjm.default/
.mozilla/firefox/plp6wzjm.default/bookmarkbackups/*
.mybackup


Result:
1. Success: with both the .mybackup and the 2 .kde4/share/apps/kabc-files
2. Success: indeed I have my bookmarks in the ../bookmarkbackups/ folder
3. Failure: I have all other files, sub-dirs and their content as well in 
.mozilla/firefox/plp6wzjm.default.
4. when adding 
  .mozilla/firefox/plp6wzjm.default/Cache
  .mozilla/firefox/plp6wzjm.default/chrome
  .mozilla/firefox/plp6wzjm.default/extensions
  .mozilla/firefox/plp6wzjm.default/firebug
  .mozilla/firefox/plp6wzjm.default/OfflineCache
 to the exclude file this folders are not in, but the normal 
.mozilla/firefox/plp6wzjm.default/ files are.

Question: it seems that I miss the point how to do this. can you please 
give a hint about what I ḿ doing wrong?

rsync command )some date-time variable for files, but that is working):

rsync -axhhX --no-perms --omit-dir-times\
 --backup --backup-dir=$NiceDate/updated --suffix=.$Now\
 --delete --delete-excluded\
 --backup-dir-dels=$NiceDate/deleted --suffix-dels=.`date +%H%M`\
 --log-file=/home/hans/.mybackup/backup.log.$RawDate-$Now\
 --include-from=/home/hans/.mybackup/include.txt\
 --exclude-from=/home/hans/.mybackup/exclude.txt\
   /home/hans /mnt/backup

===
2nd, similar question:

to play around with this stuff I wanted to test with the hidden files only 
(.*), so I tried to add all non-hidden directories and normal files to this 
exclude-test.txt, but did not get it working (it worked too much):

exclude-test.txt
.*
.mybackup/backup.log.*
[a-z]*
[A-Z]*

while my include-test is:
.kde4/share/apps/kabc/distlists
.kde4/share/apps/kabc/std.vcf
.mozilla/
.mozilla/firefox/
.mozilla/firefox/plp6wzjm.default/
.mozilla/firefox/plp6wzjm.default/bookmarkbackups/*
.mybackup

In this case I don't get any files backed up (dry-run, so checked in log-file 
only).
same rsync command (other log-file and destination)
===
Thanks for any help,

regards,

Hans Troost


-- 
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: include/exclude: I miss the point

2010-09-10 Thread Michal Soltys

On 10-09-10 21:13, Hans Troost wrote:


So my exclude-files contains:
.*

the include file contains:
.kde4/share/apps/kabc/distlists
.kde4/share/apps/kabc/std.vcf


Result:
1. Success: 2 .kde4/share/apps/kabc-files


Are you sure about that part ? '.*' ('H, .*' as seen by sending rsync) 
should short-circuit any .kde/ directory subtree and exclude it from 
file list/transfer. You would need something more elaborate to get just 
those two fles from .kde4 and nothing else.


Anyway, putting that detail aside and if I'm reading things right.

Your rules (combined) look like:

+, .mozilla/
+, .mozilla/firefox/
+, .mozilla/firefox/plp6wzjm.default/
+, .mozilla/firefox/plp6wzjm.default/bookmarkbackups/*
+, .mybackup

H, .*
H, .mybackup/backup.log.*
H, .mozilla/extensions
H, *.*~
H, Desktop
H, Downloads
H, Movies
H, Music
H, Picturestmp
H, Videos

+, * (implicit final rule)

H - because you added --delete-excluded, so receiving side will not 
protect them from deletion.


For receiving rsync that means just:
R, * (as consider everything not part of the transfer a candidate to 
delete)


For sending rsync:
S, .mozilla/
S, .mozilla/firefox/
S, .mozilla/firefox/plp6wzjm.default/
S, .mozilla/firefox/plp6wzjm.default/bookmarkbackups/*
S, .mybackup

H, .* - this makes following 2 rules redundant
H, .mybackup/backup.log.*
H, .mozilla/extensions
H, *.*~
H, Desktop
H, Downloads
H, Movies
H, Music
H, Picturestmp
H, Videos

S, * (implicit final rule)

Which does exactly what you experienced:


3. Failure: I have all other files, sub-dirs and their content as well in
.mozilla/firefox/plp6wzjm.default.


They were all caught by the final implicit include, and none of them 
matched your H (exclude) rules.



4. when adding
   .mozilla/firefox/plp6wzjm.default/Cache
   .mozilla/firefox/plp6wzjm.default/chrome
   .mozilla/firefox/plp6wzjm.default/extensions
   .mozilla/firefox/plp6wzjm.default/firebug
   .mozilla/firefox/plp6wzjm.default/OfflineCache
  to the exclude file this folders are not in, but the normal
.mozilla/firefox/plp6wzjm.default/ files are.


Being part of exclude rules, they will be catched and excluded from 
transfer, but the rest will not.


Note, that nothing from .mybackup that matches H (exclude) rules will be 
backed up.




Question: it seems that I miss the point how to do this. can you please
give a hint about what I ḿ doing wrong?

rsync command )some date-time variable for files, but that is working):

rsync -axhhX --no-perms --omit-dir-times\
  --backup --backup-dir=$NiceDate/updated --suffix=.$Now\
  --delete --delete-excluded\
  --backup-dir-dels=$NiceDate/deleted --suffix-dels=.`date +%H%M`\
  --log-file=/home/hans/.mybackup/backup.log.$RawDate-$Now\
  --include-from=/home/hans/.mybackup/include.txt\
  --exclude-from=/home/hans/.mybackup/exclude.txt\
/home/hans /mnt/backup

===
2nd, similar question:

to play around with this stuff I wanted to test with the hidden files only
(.*), so I tried to add all non-hidden directories and normal files to this
exclude-test.txt, but did not get it working (it worked too much):

exclude-test.txt
.*
.mybackup/backup.log.*
[a-z]*
[A-Z]*

while my include-test is:
.kde4/share/apps/kabc/distlists
.kde4/share/apps/kabc/std.vcf
.mozilla/
.mozilla/firefox/
.mozilla/firefox/plp6wzjm.default/
.mozilla/firefox/plp6wzjm.default/bookmarkbackups/*
.mybackup

In this case I don't get any files backed up (dry-run, so checked in log-file
only).


Hmm, you should get

.mozilla/firefox/plp6wzjm.default/bookmarkbackups/*
.mybackup/

backed up. Otherwise the rest will be hidden from transfer (to be 
precise, any file/directory starting with a letter or .).

--
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: include/exclude Problem

2010-04-28 Thread Benjamin Watkins

On 4/24/2010 8:30 AM, Michael wrote:

I have a little problem to get my include / exclude working:

I want to sync /etc /home and /usr/local (and all files/dirs beneath)
to REMOTEHOST:/dest
There are some huge files in /home which I want to exclued

I have set up an include/exclude file but I still get too much files.
Also the excluded file is synced

/usr/bin/rsync -av --exclude-from=excl --delete --numeric-ids
--relative --delete-excluded / REOMOTEHOST:/dest

cat excl
+ /mnt/md1/backup/akazia.0/
+ /mnt/md1/backup/akazia.0/etc/
+ /mnt/md1/backup/akazia.0/etc/**
+ /mnt/md1/backup/akazia.0/home/
+ /mnt/md1/backup/akazia.0/home/**
+ /mnt/md1/backup/akazia.0/usr/local/
+ /mnt/md1/backup/akazia.0/usr/local/**
- /mnt/md1/backup/akazia.0/home/installsrc/opensuse112.iso
- *

Any hint what I am do wrong? I have read the man page a thousand times ...


The include/exclude rules are processed in order until a match is found. 
 In the sample you have provided, the opensuse112.iso exclude rule will 
never be reached, as it will already have been matched by an include 
rule for the entire contents of the home directory.


If you place this exclude rule first, you will achieve the intended result.

-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: include/exclude Problem

2010-04-27 Thread Henri Shustak
 I want to sync /etc /home and /usr/local (and all files/dirs beneath) to 
 REMOTEHOST:/dest
 There are some huge files in /home which I want to exclued
 
 I have set up an include/exclude file but I still get too much files. Also 
 the excluded file is synced
 
 /usr/bin/rsync -av --exclude-from=excl --delete --numeric-ids --relative 
 --delete-excluded / REOMOTEHOST:/dest
 
 cat excl
 + /mnt/md1/backup/akazia.0/
 + /mnt/md1/backup/akazia.0/etc/
 + /mnt/md1/backup/akazia.0/etc/**
 + /mnt/md1/backup/akazia.0/home/
 + /mnt/md1/backup/akazia.0/home/**
 + /mnt/md1/backup/akazia.0/usr/local/
 + /mnt/md1/backup/akazia.0/usr/local/**
 - /mnt/md1/backup/akazia.0/home/installsrc/opensuse112.iso
 - *
 
 Any hint what I am do wrong? I have read the man page a thousand times ...


Would you kindly clarify if /mnt/md1/backup/akazia.0/ is your source or 
destination. 

When specifying directories within the rsync excludes file I believe that you 
list the files relative to the rsync source.

Finally, the following lbackup-discussion thread may be of assistance :
http://tinyurl.com/lbackup-discussion-exludes


--
This email is protected by LBackup
http://www.lbackup.org


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


include/exclude Problem

2010-04-24 Thread Michael
Hi there

I have a little problem to get my include / exclude working:

I want to sync /etc /home and /usr/local (and all files/dirs beneath) to
REMOTEHOST:/dest
There are some huge files in /home which I want to exclued

I have set up an include/exclude file but I still get too much files. Also
the excluded file is synced

/usr/bin/rsync -av --exclude-from=excl --delete --numeric-ids --relative
--delete-excluded / REOMOTEHOST:/dest

cat excl
+ /mnt/md1/backup/akazia.0/
+ /mnt/md1/backup/akazia.0/etc/
+ /mnt/md1/backup/akazia.0/etc/**
+ /mnt/md1/backup/akazia.0/home/
+ /mnt/md1/backup/akazia.0/home/**
+ /mnt/md1/backup/akazia.0/usr/local/
+ /mnt/md1/backup/akazia.0/usr/local/**
- /mnt/md1/backup/akazia.0/home/installsrc/opensuse112.iso
- *

Any hint what I am do wrong? I have read the man page a thousand times ...

Thanks a lot
Michael
-- 
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: 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


include/exclude problems

2010-03-25 Thread Vitaly V. Ganusov

Dear Wayne,

I am using rsync to synchronize my working files from home computer to 
the work computer. I want to sync only the files in some directories and 
no .files. However, I do need to sync several files from .mozilla 
director (addressbook, calendar and bookmarks) which are located in the 
.directory. I use the following command and the excluded-utk.txt file


rsync -aunvz --delete -e ssh --exclude-from 'excluded-utk.txt' 
/home/vitaly/ utk:/home/vitaly



from excluded-utk.txt file:

+ .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
- lena
- data
- doctoral
- install
- local
- stuff
- temp
- web
- Hosts
- .*

The output is:

./
.mozilla-thunderbird/
.mozilla-thunderbird/afc5fv2p.default/
.mozilla-thunderbird/afc5fv2p.default/10357267.s
.mozilla-thunderbird/afc5fv2p.default/abook.mab
.mozilla-thunderbird/afc5fv2p.default/blocklist.xml
.mozilla-thunderbird/afc5fv2p.default/files
.mozilla-thunderbird/afc5fv2p.default/junklog.html
.mozilla-thunderbird/afc5fv2p.default/localstore.rdf
.mozilla-thunderbird/afc5fv2p.default/panacea.dat
.mozilla-thunderbird/afc5fv2p.default/storage.sdb
.mozilla-thunderbird/afc5fv2p.default/training.dat
refs/computers/
refs/computers/excluded-utk.txt
refs/computers/excluded-utk.txt-def

No storage.sdb is transferred. Can you help me with figuring out why 
this is the case?


Thanks a lot,

Vitaly
--
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: include/exclude problems

2010-03-25 Thread Paul Slootman
On Thu 25 Mar 2010, Vitaly V. Ganusov wrote:
 
 from excluded-utk.txt file:
 
 + .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
[snip]
 
 The output is:
 
 ./
 .mozilla-thunderbird/
 .mozilla-thunderbird/afc5fv2p.default/
 .mozilla-thunderbird/afc5fv2p.default/10357267.s
 .mozilla-thunderbird/afc5fv2p.default/abook.mab
 .mozilla-thunderbird/afc5fv2p.default/blocklist.xml
 .mozilla-thunderbird/afc5fv2p.default/files
 .mozilla-thunderbird/afc5fv2p.default/junklog.html
 .mozilla-thunderbird/afc5fv2p.default/localstore.rdf
 .mozilla-thunderbird/afc5fv2p.default/panacea.dat
 .mozilla-thunderbird/afc5fv2p.default/storage.sdb
[snip]
 No storage.sdb is transferred. Can you help me with figuring out

I definitely see it in your output.
Why do you say it's not transferred?


Paul (not 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


Re: include/exclude problems

2010-03-25 Thread Vitaly V. Ganusov
You are right, the reason that I did not see that before is that the 
file on the server was newer than on my desktop. It now all works.


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?


Many thanks in advance,

Vitaly

PS. My current exclude-utk.txt file is attached.

Paul Slootman wrote:

On Thu 25 Mar 2010, Vitaly V. Ganusov wrote:

from excluded-utk.txt file:

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

[snip]

The output is:

./
.mozilla-thunderbird/
.mozilla-thunderbird/afc5fv2p.default/
.mozilla-thunderbird/afc5fv2p.default/10357267.s
.mozilla-thunderbird/afc5fv2p.default/abook.mab
.mozilla-thunderbird/afc5fv2p.default/blocklist.xml
.mozilla-thunderbird/afc5fv2p.default/files
.mozilla-thunderbird/afc5fv2p.default/junklog.html
.mozilla-thunderbird/afc5fv2p.default/localstore.rdf
.mozilla-thunderbird/afc5fv2p.default/panacea.dat
.mozilla-thunderbird/afc5fv2p.default/storage.sdb

[snip]

No storage.sdb is transferred. Can you help me with figuring out


I definitely see it in your output.
Why do you say it's not transferred?


Paul (not Wayne :)
#+ local/
#+ local/bin/
#+ local/bin/*
+ .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
- .mozilla-thunderbird/afc5fv2p.default/10357267.s
- .mozilla-thunderbird/afc5fv2p.default/blocklist.xml
- .mozilla-thunderbird/afc5fv2p.default/files
- .mozilla-thunderbird/afc5fv2p.default/junklog.html
- .mozilla-thunderbird/afc5fv2p.default/localstore.rdf
- .mozilla-thunderbird/afc5fv2p.default/panacea.dat
- .mozilla-thunderbird/afc5fv2p.default/training.dat
+ .mozilla/
- .mozilla/Default User/
+ .mozilla/firefox/
- .mozilla/extensions/
- .mozilla/sunbird/
- .mozilla/plugins/
+ .mozilla/firefox/5dpdgl81.default/
- .mozilla/firefox/5dpdgl81.default/extensions/
- .mozilla/firefox/5dpdgl81.default/chrome/
- .mozilla/firefox/5dpdgl81.default/bookmarkbackups/
- .mozilla/firefox/5dpdgl81.default/forecasefox/
- .mozilla/firefox/5dpdgl81.default/Cache/
- .mozilla/firefox/5dpdgl81.default/searchplugins/
- .mozilla/firefox/5dpdgl81.default/minidumps/
- .mozilla/firefox/Crash Reports/
- .mozilla/appreg
- .mozilla/mozver.dat
- .mozilla/pluginreg.dat
- .mozilla/firefox/5dpdgl81.default/urlclassifier3.sqlite
- .mozilla/firefox/5dpdgl81.default/signons.sqlite
- .mozilla/firefox/5dpdgl81.default/cookies.sqlite-journal
- .mozilla/firefox/5dpdgl81.default/XUL.mfasl
- .mozilla/firefox/5dpdgl81.default/blocklist.xml
- .mozilla/firefox/5dpdgl81.default/bookmarks-1.html
- .mozilla/firefox/5dpdgl81.default/bookmarks.bak
- .mozilla/firefox/5dpdgl81.default/cert8.db
- .mozilla/firefox/5dpdgl81.default/cert_override.txt
- .mozilla/firefox/5dpdgl81.default/components.ini
- .mozilla/firefox/5dpdgl81.default/content-prefs.sqlite
- .mozilla/firefox/5dpdgl81.default/cookies.sqlite
- .mozilla/firefox/5dpdgl81.default/defaults.ini
- .mozilla/firefox/5dpdgl81.default/downloads.sqlite
- .mozilla/firefox/5dpdgl81.default/extensions.log
- .mozilla/firefox/5dpdgl81.default/formhistory.dat
- .mozilla/firefox/5dpdgl81.default/history.dat
- .mozilla/firefox/5dpdgl81.default/install.log
- .mozilla/firefox/5dpdgl81.default/kf.txt
- .mozilla/firefox/5dpdgl81.default/localstore.rdf
- .mozilla/firefox/5dpdgl81.default/lock
- .mozilla/firefox/5dpdgl81.default/mimeTypes.rdf
- .mozilla/firefox/5dpdgl81.default/pluginreg.dat
- .mozilla/firefox/5dpdgl81.default/search.rdf
- .mozilla/firefox/5dpdgl81.default/search.sqlite
- .mozilla/firefox/5dpdgl81.default/secmod.db
- .mozilla/firefox/5dpdgl81.default/sessionstore.bak
- .mozilla/firefox/5dpdgl81.default/sessionstore.js
- .mozilla/firefox/5dpdgl81.default/sessionstore.tmp
- .mozilla/firefox/5dpdgl81.default/signons2.txt
- .mozilla/firefox/5dpdgl81.default/signons3.txt
- .mozilla/firefox/5dpdgl81.default/urlclassifier2.sqlite
- .mozilla/firefox/5dpdgl81.default/urlclassifierkey3.txt
- .mozilla/firefox/5dpdgl81.default/OfflineCache/
- .mozilla/firefox/5dpdgl81.default/forecastfox/
- .mozilla/firefox/5dpdgl81.default/places.sqlite-journal
+ .mozilla/firefox/5dpdgl81.default/bookmarks.html
+ .mozilla/firefox/5dpdgl81.default/places.sqlite
- lena
- data
- doctoral
- install
- local
- stuff
- temp
- web
- Hosts
- .*
-- 
Please use reply-all for most replies to avoid omitting the mailing list.
To unsubscribe or change options: 

Re: Yet another include/exclude question

2009-11-09 Thread Wayne Davison
On Sun, Nov 8, 2009 at 10:21 PM, Thomas Gutzler thomas.gutz...@gmail.comwrote:

 I thought --include=/this_dir/ --include=/this_dir/*** would do it,
 but it doesn't. The exclude * seems to overwrite the include matches:
  [sender] hiding file this_dir/foo because of pattern *


Order is important.  Whatever matches first, is what takes effect.  Also,
*** matches both the dir and its contents, so you could use:

  --include='/this_dir/***' --exclude=*

As long as this_dir is in the root of the transfer, that will work.

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

Re: Yet another include/exclude question

2009-11-09 Thread Thomas Gutzler
Thanks everyone for your help, I've got what I want.

Wayne Davison wrote:
 On Sun, Nov 8, 2009 at 10:21 PM, Thomas Gutzler
 thomas.gutz...@gmail.com mailto:thomas.gutz...@gmail.com wrote:
 
 I thought --include=/this_dir/ --include=/this_dir/*** would do it,
 but it doesn't. The exclude * seems to overwrite the include matches:
  [sender] hiding file this_dir/foo because of pattern *
 
 
 Order is important.  Whatever matches first, is what takes effect. 
 Also, *** matches both the dir and its contents, so you could use:
 
   --include='/this_dir/***' --exclude=*

It seems to be very picky about the order. Thanks for pointing that out.
My first attempt has been
--include=*/ --include=*.foo --include=*.bar
--include=/this_dir/*** --exclude=*
which did nothing than *.foo and *.bar. Shuffling it around, I found that
--include=*/ --include=/this_dir/*** --include=*.foo
--include=*.bar --exclude=*
does what I want and it even makes sense.

Cheers,
  Tom

-- 
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: Yet another include/exclude question

2009-11-09 Thread Matt McCutchen
On Tue, 2009-11-10 at 09:45 +0800, Thomas Gutzler wrote:
 Thanks everyone for your help, I've got what I want.
 
 Wayne Davison wrote:
  On Sun, Nov 8, 2009 at 10:21 PM, Thomas Gutzler
  thomas.gutz...@gmail.com mailto:thomas.gutz...@gmail.com wrote:
  
  I thought --include=/this_dir/ --include=/this_dir/*** would do it,
  but it doesn't. The exclude * seems to overwrite the include matches:
   [sender] hiding file this_dir/foo because of pattern *
  
  
  Order is important.  Whatever matches first, is what takes effect. 
  Also, *** matches both the dir and its contents, so you could use:
  
--include='/this_dir/***' --exclude=*
 
 It seems to be very picky about the order. Thanks for pointing that out.
 My first attempt has been
 --include=*/ --include=*.foo --include=*.bar
 --include=/this_dir/*** --exclude=*
 which did nothing than *.foo and *.bar. Shuffling it around, I found that
 --include=*/ --include=/this_dir/*** --include=*.foo
 --include=*.bar --exclude=*
 does what I want and it even makes sense.

Those two commands should be equivalent.  If you have a reproducible
case in which they aren't, please share it and we can see if there's a
bug.

I tried the first command and it worked fine for me.  That is, after I
fixed a typo I made in the name of this_dir, which left the
--include=/this_dir/*** nonfunctional and gave a result like the one
you cited above:

[sender] hiding file this-dir/one because of pattern *

-- 
Matt

-- 
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: Yet another include/exclude question

2009-11-09 Thread Thomas Gutzler
Matt McCutchen wrote:
 On Tue, 2009-11-10 at 09:45 +0800, Thomas Gutzler wrote:
 Thanks everyone for your help, I've got what I want.

 My first attempt has been
 --include=*/ --include=*.foo --include=*.bar
 --include=/this_dir/*** --exclude=*
 which did nothing than *.foo and *.bar. Shuffling it around, I found that
 --include=*/ --include=/this_dir/*** --include=*.foo
 --include=*.bar --exclude=*
 does what I want and it even makes sense.
 
 Those two commands should be equivalent.  If you have a reproducible
 case in which they aren't, please share it and we can see if there's a
 bug.

Going through my history, I found that I must have accidentally put a
whitespace between '--include' and '=' which wasn't very obvious at the
time thanks to the line wrapping of my terminal. I should have used an
include file instead :)
So no, no bugs.

Tom

-- 
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: Yet another include/exclude question

2009-11-08 Thread Thomas Gutzler
What if I also want to include everything in /this_dir/ without running
two instances and still being able to use --delete?
I thought --include=/this_dir/ --include=/this_dir/*** would do it,
but it doesn't. The exclude * seems to overwrite the include matches:
 [sender] hiding file this_dir/foo because of pattern *

Tom

Steven Monai wrote:
 Tony wrote:
 On Nov 6, 2009, at 12:43 AM, Thomas Gutzler wrote:
 Hi,

 How can I include only *.foo and *.bar files in an rsync?
 To make it a bit more difficult: Those files can be anywhere in the
 directory structure.

 I've been reading and trying for a while but the best I got is all
 *.foo and *.bar files in ./ but none of the ones inside any
 directories.
 There is an example in the man pages for *.c files that will do what you
 want.

 Try:  --include=*/ --include=*.foo --exclude=*
 
 Yes. I would also strongly recommend the section of the man page that
 describes --prune-empty-dirs.
 
 Cheers,
 -SM
 --

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


Yet another include/exclude question

2009-11-05 Thread Thomas Gutzler
Hi,

How can I include only *.foo and *.bar files in an rsync?
To make it a bit more difficult: Those files can be anywhere in the
directory structure.

I've been reading and trying for a while but the best I got is all
*.foo and *.bar files in ./ but none of the ones inside any
directories.

Cheers,
  Tom
-- 
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


idea: include/exclude files by mime type (use magic like file(1) does)

2009-06-18 Thread Shawn Rutledge
I have been thinking this would be a nice feature: exclude files by
type rather than just regular expressions.  Mostly because binaries
don't have any extension on Linux, so they aren't recognizable just by
name.  At work I rsync a source directory for doing builds in a chroot
environment for the target system, and I'd like to exclude binaries
that happen to be in the tree, on the host system.  (It's easy enough
to exclude the .o files but not the final linked executables.)
Likewise at home, I was thinking of rsyncing my home directory between
a couple of machines, one of which is 32-bit, so it doesn't make sense
to sync any 64-bit binaries from other machines to that one.  So I
would like to exclude ELF executables or application/x-executable
from the rsync.

I think for speed, if the --exclude-mime option is given, rsync would
need to process the other include/exclude patterns first, then as a
final pass, basically look up the magic numbers the same way that
file(1) does for each file that it plans to transfer, and exclude
files on that basis.  For --include-mime, it wouldn't be as efficient
(would have to get the mime type for every candidate file).
-- 
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: include/exclude tutorial

2009-04-01 Thread Imbaud Pierre

Finally, I succeeded; with a --exclude-from= pointing to a file containing:

+ /tmp
+ /tmp/*.conf
- *

Lessons:

- when U want only a few files, first include these files, then exclude 
everything else

- include directories too.
- run the command without exclude-from, to spot where root is located: 
in my case, etc was part of the root, which I didnt take into account.

- '- *' excludes directories too

But well, Im still unhappy.

When we read a program, written for a von-neuman machine (I mean: one 
processor, one process, one thread), we have a way to foresee what it 
does: in the head, or with paper or a board if too intricate, run the 
program by hand, step by step, as if single stepping with a debugger.
I think we need here a method to represent how the files flow is 
processed by rules.


Imbaud Pierre wrote:
Maybe I am tired. I have been reading man page, and these messages, and 
the website, I just dont understand how include/exclude works.


Is there a decent tutorial on the subject, I missed, for some reason?

all I want is to take /var/tmp/*.conf files. I dont want to recurse down 
thru directories (but, for reasons hard to explain, I must have the 
recursive option on)


Reminds me when I tried to understand the find -prune option. I never 
succeeded.


Or should I proceed empirically, preparing directories, and trying 
combination?


And please tell me, those who master the include/exclude technique: how 
long did it take to reach full understanding?




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


Include/Exclude problems

2009-01-25 Thread Mag Gam
hi,

I am trying to rsync a very large filesystem which is about 3TB, but
naturally I want to exclude a lot of things. However, I am really
struggling with excluding directories.

SRC=/dasd/december/2008  #Notice there is no trailing slash
TARGET=/backup/december/2008 #Notice there is no trailing slash

I want to exclude

/dasd/december/2008/Data
/dasd/december/2008/Logs
/dasd/december/2008/Catalogs

#NOTICE: I added a trailing slash for $SRC but nothing for $TARGET
rsync --exclude Data/** --exclude Catalogs/**  --exclude Logs/**
--numeric-ids --archive --delete --delete-excluded --human-readable
--stats --verbose --progress $SRC/ $TARGET.0



For some reason Data Logs and Catalogs are still being synced.

BTW, I am using the hardlink method to keep snapshots. So before the
rsync I am cp -al from 0 to 1 and removing the oldest


Any ideas?
TIA
-- 
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: Include/Exclude problems

2009-01-25 Thread Matt McCutchen
On Sun, 2009-01-25 at 10:29 -0500, Mag Gam wrote:
 I am trying to rsync a very large filesystem which is about 3TB, but
 naturally I want to exclude a lot of things. However, I am really
 struggling with excluding directories.
 
 SRC=/dasd/december/2008  #Notice there is no trailing slash
 TARGET=/backup/december/2008 #Notice there is no trailing slash
 
 I want to exclude
 
 /dasd/december/2008/Data
 /dasd/december/2008/Logs
 /dasd/december/2008/Catalogs
 
 #NOTICE: I added a trailing slash for $SRC but nothing for $TARGET
 rsync --exclude Data/** --exclude Catalogs/**  --exclude Logs/**
 --numeric-ids --archive --delete --delete-excluded --human-readable
 --stats --verbose --progress $SRC/ $TARGET.0
 
 For some reason Data Logs and Catalogs are still being synced.

Your rules should match all the contents of the Data, Logs, and Catalogs
dirs, so the only thing I can guess is that the shell is expanding the
whildcards.  To avoid that, quote the rules:

--exclude 'Data/**' --exclude 'Catalogs/**' --exclude 'Logs/**'

Still, those rules may not be quite what you want.  The
directories /dasd/december/2008/{Data,Logs,Catalogs} themselves are not
excluded; to exclude them, you can change the trailing ** on each rule
to *** or just remove it and rely on exclusion of the directory
short-circuiting the traversal of its contents (see the man page).

Also, the rules will match directories named Data, Logs, or Catalogs
anywhere under /dasd/december/2008 .  You probably want to anchor them
with a leading slash to match only the specific directories you listed.

With both of these changes, the rules would be:

--exclude /Data/ --exclude /Catalogs/ --exclude /Logs/

 BTW, I am using the hardlink method to keep snapshots. So before the
 rsync I am cp -al from 0 to 1 and removing the oldest

You might consider --link-dest=$TARGET.1 instead; it will save you a
step and avoid corrupting the attributes of old backups.

-- 
Matt

-- 
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: Include/Exclude problems

2009-01-25 Thread Mag Gam
Thanks Matt for the response.

The *** was the magic bullet and it works. Thanks.

I was curious about the --link-dest argument.  Will this speed up
anything? I noticed it has the same default behavior of cp -al

If its faster or more efficient I would be more than happy to implement this.







On Sun, Jan 25, 2009 at 11:03 AM, Matt McCutchen m...@mattmccutchen.net wrote:
 On Sun, 2009-01-25 at 10:29 -0500, Mag Gam wrote:
 I am trying to rsync a very large filesystem which is about 3TB, but
 naturally I want to exclude a lot of things. However, I am really
 struggling with excluding directories.

 SRC=/dasd/december/2008  #Notice there is no trailing slash
 TARGET=/backup/december/2008 #Notice there is no trailing slash

 I want to exclude

 /dasd/december/2008/Data
 /dasd/december/2008/Logs
 /dasd/december/2008/Catalogs

 #NOTICE: I added a trailing slash for $SRC but nothing for $TARGET
 rsync --exclude Data/** --exclude Catalogs/**  --exclude Logs/**
 --numeric-ids --archive --delete --delete-excluded --human-readable
 --stats --verbose --progress $SRC/ $TARGET.0

 For some reason Data Logs and Catalogs are still being synced.

 Your rules should match all the contents of the Data, Logs, and Catalogs
 dirs, so the only thing I can guess is that the shell is expanding the
 whildcards.  To avoid that, quote the rules:

 --exclude 'Data/**' --exclude 'Catalogs/**' --exclude 'Logs/**'

 Still, those rules may not be quite what you want.  The
 directories /dasd/december/2008/{Data,Logs,Catalogs} themselves are not
 excluded; to exclude them, you can change the trailing ** on each rule
 to *** or just remove it and rely on exclusion of the directory
 short-circuiting the traversal of its contents (see the man page).

 Also, the rules will match directories named Data, Logs, or Catalogs
 anywhere under /dasd/december/2008 .  You probably want to anchor them
 with a leading slash to match only the specific directories you listed.

 With both of these changes, the rules would be:

 --exclude /Data/ --exclude /Catalogs/ --exclude /Logs/

 BTW, I am using the hardlink method to keep snapshots. So before the
 rsync I am cp -al from 0 to 1 and removing the oldest

 You might consider --link-dest=$TARGET.1 instead; it will save you a
 step and avoid corrupting the attributes of old backups.

 --
 Matt


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


Include/Exclude Pattern for rsync ONLY the latest file of the src dir

2008-10-28 Thread Stefan Mosleitner
Hi,

Is it possible to selcect a particular source directory and filter/select
ONLY the latest file in this directory for rsync?



-- 
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: Include/Exclude Pattern for rsync ONLY the latest file of the src dir

2008-10-28 Thread Matt McCutchen
On Tue, 2008-10-28 at 14:58 +0100, Stefan Mosleitner wrote:
 Is it possible to selcect a particular source directory and filter/select
 ONLY the latest file in this directory for rsync?

Selection of the latest file is not built into rsync, but it can be
scripted easily:

rsync OPTION... SRC/$(ls -t1 SRC | head -n 1) DEST/

Or you can do something like --include=$(ls -t1 SRC | head -n 1)
--exclude='*' if you prefer.

Matt

-- 
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: INCLUDE/EXCLUDE PATTERN RULES problem on MAC OS

2008-09-27 Thread Shachar Shemesh

Matt McCutchen wrote:


(since rsync does a binary comparison).

rsync as well as the Unix kernel, typically.

I have implemented i18n support in several programs before, I am working 
on a draft for BiDi text editing, and I had to look up what 
decomposition means. If that's the case, I doubt we can trust a sane 
(vs., e.g., myself) user to get it right.


I think the right thing is for rsync to have, #ifdefed on a Mac build, a 
decomposition algorithm for the exclude/include files. Please note that 
while HFS insists on decomposed characters, there is no such requirement 
from plain text files. For all we know, a file typed on Mac may still 
fail to match the file names.


Shachar

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


INCLUDE/EXCLUDE PATTERN RULES problem on MAC OS

2008-09-25 Thread mathias lambeau
Bonjour,

I would like to back up several desktop computer, and notebooks who are
running under Mac OS, on a linux server with ext3 filesystem.

I try several times with rsync, using include lists (
--include-from=my_include_file).
The include list is working except for directory and filename with special
character ( like french one : é,è,ù etc ...).
The pattern in the include list don't match with filesystem, and my
file/directory isn't on the backup.

ex :
if my include list is :
+ /Desktop
+ /dev
+ /prod
+ /cluster
+ /société
- *

the directory société, isn't save by rsync.

have you an idee?

mathias
-- 
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

having a problem with include/exclude logic

2008-02-21 Thread Sterling Windmill
I am trying to change our backup strategy from one where we include only 
certain directories and exclude everything else to a blanket include and a list 
of excluded files and/or directories.

I am pulling files from an rsync 2.6.9 daemon with the following command:

rsync -avrH --numeric-ids --ignore-errors --delete --delete-excluded --stats 
--filter=. mergelist.dat remoteservername::modulename /localbackupdir

The issue at hand is this:

I want to include certain files (hopefully with a wildcard) from the remote 
server in a directory called /scratch2/prod_dp_exports/ but exclude any other 
files or directories recursively starting at /scratch2/

I also want to include everything else (/) from the remote server except for a 
few directories/mountpoints that I will also be specifying (/proc/*, /sys/*, 
etc.)

I have played with --files-from, --include-from and --exclude-from as well as 
the --filter included in the command above, but I can't seem to make this 
happen.

An example of the filter file I've been trying to get working:

+ /
+ /scratch2/prod_dp_exports/FULL*
- /scratch2/*
- /proc/*
- /sys/*
- /dev/*

I seem to have much better luck with the reverse logic, meaning including only 
what I want and adding a - * to the end of my filter file.

Any thoughts/comments/flames would be greatly appreciated.

Best regards,
Sterling Windmill

 
 Sterling Windmill
  Systems and Technology
  Phone: 586-752-9671 Ext 161
  Fax: 586-752-6589
  www.custdata.com  

CONFIDENTIALITY NOTICE: This email contains information from the sender that 
may be CONFIDENTIAL, LEGALLY PRIVILEGED, PROPRIETARY or otherwise protected 
from disclosure. This email is intended for use only by the person or entity to 
whom it is addressed. If you are not the intended recipient, any use, 
disclosure, copying, distribution, printing, or any action taken in reliance on 
the contents of this email, is strictly prohibited. If you received this email 
in error, please contact the sending party by replying in an email to the 
sender, delete the email from your computer system and shred any paper copies 
of the email you printed. LOGO.gif-- 
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 5182] -r --include= --exclude= broken for version=3.0.0pre5?

2008-01-10 Thread samba-bugs
https://bugzilla.samba.org/show_bug.cgi?id=5182





--- Comment #7 from [EMAIL PROTECTED]  2008-01-10 02:12 CST ---
Hello
just re-built 3.0.0pre7 with the fix and everything works fine.
Thanks a lot for the quick and efficient support

ciao


-- 
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.
-- 
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 5182] New: -r --include= --exclude= broken for version=3.0.0pre5?

2008-01-09 Thread samba-bugs
https://bugzilla.samba.org/show_bug.cgi?id=5182

   Summary: -r --include= --exclude=  broken for version=3.0.0pre5?
   Product: rsync
   Version: 3.0.0
  Platform: x86
OS/Version: Linux
Status: NEW
  Severity: normal
  Priority: P3
 Component: core
AssignedTo: [EMAIL PROTECTED]
ReportedBy: [EMAIL PROTECTED]
 QAContact: [EMAIL PROTECTED]


Hello,

I'm probably missing something (apologies if so), but this has worked
for me for years, and starting from 3.0.0pre5 has stopped working in a
way that smells of some kind of bug.

To reproduce the (possible) bug, set up the following scene.

Remote host/directory: remote_host:/some/dir
Local host:current directory containing file `foo'

(I'm assuming working passwordless ssh connection between local and
remote host)



From the directory containing the file foo I issue the following command:

  rsync -e ssh  -r --include='/foo' --exclude='*' ./ remote_host:/some/dir


Now: for versions =3.0.0pre4 this copies foo to the remote host, but
for versions =3.0.0pre5, foo is not copied any more.

Running the command in verbose mode does not throw any light into my
(lack of) knowledge:

  rsync -e ssh  -rvv --include='/foo' --exclude='*' ./ remote_host:/some/dir

gives:

opening connection using: ssh remote_host rsync --server -vvre30.14i . 
/some/dir
sending incremental file list
removing duplicate name . from file list (2)
removing duplicate name . from file list (3)
removing duplicate name . from file list (4)
removing duplicate name . from file list (5)
delta-transmission enabled
total: matches=0  hash_hits=0  false_alarms=0 data=0

sent 51 bytes  received 15 bytes  132.00 bytes/sec
total size is 0  speedup is 0.00


I can add that all works nicely even with version=3.0.0pre5 the other
way around: i.e.:

  rsync -e ssh  -r --include='/foo' --exclude='*' remote_host:/some/dir ./

copies remote_host:/some/dir/foo into local current directory, as I
was always used to obtain.

Am I doing something wrong or something has changed between 3.0.0pre4
and 3.0.0pre5?

I could not find any report on this in bugzilla, and this makes me
think I might be making some gross mistake, but, as I said, that used
to work for years and still perfectly works for versions=3.0.0pre4.

I'm on linux (2.6.23.12, i686)

I thank you very much in advance for any hint and, of course, for
making rsync available.


ciao
gabriele


-- 
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.
-- 
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 5183] New: -r --include= --exclude= broken for version=3.0.0pre5?

2008-01-09 Thread samba-bugs
https://bugzilla.samba.org/show_bug.cgi?id=5183

   Summary: -r --include= --exclude=  broken for version=3.0.0pre5?
   Product: rsync
   Version: 3.0.0
  Platform: x86
OS/Version: Linux
Status: NEW
  Severity: normal
  Priority: P3
 Component: core
AssignedTo: [EMAIL PROTECTED]
ReportedBy: [EMAIL PROTECTED]
 QAContact: [EMAIL PROTECTED]


Hello,

I'm probably missing something (apologies if so), but this has worked
for me for years, and starting from 3.0.0pre5 has stopped working in a
way that smells of some kind of bug.

To reproduce the (possible) bug, set up the following scene.

Remote host/directory: remote_host:/some/dir
Local host:current directory containing file `foo'

(I'm assuming working passwordless ssh connection between local and
remote host)



From the directory containing the file foo I issue the following command:

  rsync -e ssh  -r --include='/foo' --exclude='*' ./ remote_host:/some/dir


Now: for versions =3.0.0pre4 this copies foo to the remote host, but
for versions =3.0.0pre5, foo is not copied any more.

Running the command in verbose mode does not throw any light into my
(lack of) knowledge:

  rsync -e ssh  -rvv --include='/foo' --exclude='*' ./ remote_host:/some/dir

gives:

opening connection using: ssh remote_host rsync --server -vvre30.14i . 
/some/dir
sending incremental file list
removing duplicate name . from file list (2)
removing duplicate name . from file list (3)
removing duplicate name . from file list (4)
removing duplicate name . from file list (5)
delta-transmission enabled
total: matches=0  hash_hits=0  false_alarms=0 data=0

sent 51 bytes  received 15 bytes  132.00 bytes/sec
total size is 0  speedup is 0.00


I can add that all works nicely even with version=3.0.0pre5 the other
way around: i.e.:

  rsync -e ssh  -r --include='/foo' --exclude='*' remote_host:/some/dir ./

copies remote_host:/some/dir/foo into local current directory, as I
was always used to obtain.

Am I doing something wrong or something has changed between 3.0.0pre4
and 3.0.0pre5?

I could not find any report on this in bugzilla, and this makes me
think I might be making some gross mistake, but, as I said, that used
to work for years and still perfectly works for versions=3.0.0pre4.

I'm on linux (2.6.23.12, i686)

I thank you very much in advance for any hint and, of course, for
making rsync available.


ciao
gabriele


-- 
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.
-- 
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 5183] -r --include= --exclude= broken for version=3.0.0pre5?

2008-01-09 Thread samba-bugs
https://bugzilla.samba.org/show_bug.cgi?id=5183





--- Comment #1 from [EMAIL PROTECTED]  2008-01-09 11:15 CST ---
oops, sorry for the duplicate
please delete


-- 
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.
-- 
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 5182] -r --include= --exclude= broken for version=3.0.0pre5?

2008-01-09 Thread samba-bugs
https://bugzilla.samba.org/show_bug.cgi?id=5182





--- Comment #1 from [EMAIL PROTECTED]  2008-01-09 11:24 CST ---
I can reproduce this.  The problem happens even without the --include and
--exclude options, but apparently only if the source argument is given as
exactly ./.  A workaround is to change the source to ..


-- 
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.
-- 
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 5182] -r --include= --exclude= broken for version=3.0.0pre5?

2008-01-09 Thread samba-bugs
https://bugzilla.samba.org/show_bug.cgi?id=5182





--- Comment #3 from [EMAIL PROTECTED]  2008-01-09 11:57 CST ---
Created an attachment (id=3091)
 -- (https://bugzilla.samba.org/attachment.cgi?id=3091action=view)
Fix

The attached patch seems to fix the bug; I don't know if it's the right fix. 
The trouble was that, when rsync nulled out the trailing slash of the ./
source argument, it failed to retreat the pointer at which it appended the
names of files in the directory.  As a result, it tried to send .\0/src
(i.e., .) instead of ./src, hence the removing duplicate name message. 
I'm not sure why this wasn't a problem in rsync 3.0.0pre4.


-- 
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.
-- 
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 5182] -r --include= --exclude= broken for version=3.0.0pre5?

2008-01-09 Thread samba-bugs
https://bugzilla.samba.org/show_bug.cgi?id=5182





--- Comment #4 from [EMAIL PROTECTED]  2008-01-09 12:02 CST ---
thank you very much!
I'm going home now: I'll try the patch tomorrow and let you know

ciao


-- 
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.
-- 
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 5183] -r --include= --exclude= broken for version=3.0.0pre5?

2008-01-09 Thread samba-bugs
https://bugzilla.samba.org/show_bug.cgi?id=5183


[EMAIL PROTECTED] changed:

   What|Removed |Added

 Status|NEW |RESOLVED
 Resolution||DUPLICATE




--- Comment #2 from [EMAIL PROTECTED]  2008-01-09 14:10 CST ---


*** This bug has been marked as a duplicate of 5182 ***


-- 
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.
-- 
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 5182] -r --include= --exclude= broken for version=3.0.0pre5?

2008-01-09 Thread samba-bugs
https://bugzilla.samba.org/show_bug.cgi?id=5182





--- Comment #6 from [EMAIL PROTECTED]  2008-01-09 14:10 CST ---
*** Bug 5183 has been marked as a duplicate of this bug. ***


-- 
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.
-- 
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 5182] -r --include= --exclude= broken for version=3.0.0pre5?

2008-01-09 Thread samba-bugs
https://bugzilla.samba.org/show_bug.cgi?id=5182


[EMAIL PROTECTED] changed:

   What|Removed |Added

 Status|NEW |RESOLVED
 Resolution||FIXED




--- Comment #5 from [EMAIL PROTECTED]  2008-01-09 14:09 CST ---
This is now fixed in the latest dev version (including git and nightly tar
file).

Thanks for the report and the diagnosis.


-- 
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.
-- 
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 4764] Wrong include/exclude descriptions

2007-07-05 Thread samba-bugs
https://bugzilla.samba.org/show_bug.cgi?id=4764


[EMAIL PROTECTED] changed:

   What|Removed |Added

 Status|RESOLVED|REOPENED
 Resolution|INVALID |




--- Comment #3 from [EMAIL PROTECTED]  2007-07-05 17:13 CST ---
I have tried that too, but without any luck:

INCLUDE/EXCLUDE PATTERN RULES
   You can include and exclude files by specifying patterns using
   the +, -, etc. filter rules  (as  introduced in  the  FILTER
   RULES section above).  The include/exclude rules each specify a
   pattern that is matched against the names of the files that are
   going to be transferred.  These patterns can take several forms:

   o  if the pattern starts with a / then it is anchored to
  a particular spot in the hierarchy of files,  oth-
  erwise it is matched against the end of the pathname.
  This is similar to a leading ^ in regular expres-
  sions.  Thus /foo would match a file named foo at
  either the root of the transfer  (for  a  global
  rule) or in the merge-file’s directory (for a per-
  directory rule).  An unqualified foo would match any
  file or directory named foo anywhere in the tree
  because the algorithm is applied recursively from the
  top  down; it behaves as if each path component gets
  a turn at being the end of the file name.  Even the
  unanchored sub/foo would match at any point in the
  hierarchy where a foo was found within  a  direc-
  tory named sub.  See the section on ANCHORING
  INCLUDE/EXCLUDE PATTERNS for a full discussion of how
  to specify a pattern that matches at the root of
  the transfer.

   o  if the pattern ends with a / then it will only match
  a directory, not a file, link, or device.

if this where true, an --exclude-from file

+ 6/
- *

should only match directories named '6'. For example

core/6
update/6

and so on. Could you please explain me, why I am seeing with this rule above

$ rsync -av --exclude-from=exclude.txt rsync://mirrors.kernel.org/fedora/
[...]
receiving file list ... done
drwxr-xr-x  77 2007/05/21 23:37:48 .

sent 101 bytes  received 787 bytes  118.40 bytes/sec
total size is 0  speedup is 0.00

The driectories '6' are not matched at all --- and there are some of them
within this hierarchy! At least these I expect to be listed!

Changing the rule to
+ 6/
+ 6/*
- *

if following the description should make it match all files within any
directory named '6'. But again:
$ rsync -av --exclude-from=exclude.txt rsync://mirrors.kernel.org/fedora/
[...]
receiving file list ... done
drwxr-xr-x  77 2007/05/21 23:37:48 .

sent 110 bytes  received 787 bytes  94.42 bytes/sec
total size is 0  speedup is 0.00


   o  rsync chooses between doing a simple string match and
  wildcard matching by checking if the pattern  con-
  tains one of these three wildcard characters: ’*’,
  ’?’, and ’[’ .

   o  a ’*’ matches any non-empty path component (it stops
  at slashes).

if this where true, the rule

+ */*/*
- *

would match any file or directory like

core/6/...

But:
$ rsync -av --exclude-from=exclude.txt rsync://mirrors.kernel.org/fedora/
[...]
receiving file list ... done
drwxr-xr-x  77 2007/05/21 23:37:48 .

sent 104 bytes  received 787 bytes  93.79 bytes/sec
total size is 0  speedup is 0.00

No match at all!

   o  use ’**’ to match anything, including slashes.

   o  a ’?’ matches any character except a slash (/).

   o  a ’[’ introduces a character class, such as
  [a-z] or [[:alpha:]].

   o  in  a wildcard pattern, a backslash can be used to
  escape a wildcard character, but it is matched liter-
  ally when no wildcards are present.

   o  if the pattern contains a / (not counting a trailing
  /) or a **, then it is matched against  the  full
  pathname,  including  any  leading directories. If
  the pattern doesn’t contain a / or a **, then it
  is matched only against the final component of the
  filename.   (Remember  that  the  algorithm  is
  applied recursively  so  full  filename  can
  actually be any portion of a path from the starting
  directory on down.)

If this where true, the rule

+ /**/6
- *

would match all files or directories '6'. But:
$ rsync -av --exclude-from=exclude.txt rsync://mirrors.kernel.org/fedora/
[...]
receiving file list ... done
drwxr-xr-x  77 2007/05/21 23:37:48 .

sent 104 bytes  received 787 bytes  93.79

DO NOT REPLY [Bug 4764] Wrong include/exclude descriptions

2007-07-05 Thread samba-bugs
https://bugzilla.samba.org/show_bug.cgi?id=4764





--- Comment #4 from [EMAIL PROTECTED]  2007-07-05 17:39 CST ---
(In reply to comment #3)
 if this where true, an --exclude-from file
 
 + 6/
 - *
 
 should only match directories named '6'. For example
 
 core/6
 update/6
 
 and so on. Could you please explain me, why I am seeing with this rule above
 
 $ rsync -av --exclude-from=exclude.txt rsync://mirrors.kernel.org/fedora/
 [...]
 receiving file list ... done
 drwxr-xr-x  77 2007/05/21 23:37:48 .
 
 sent 101 bytes  received 787 bytes  118.40 bytes/sec
 total size is 0  speedup is 0.00
 
 The driectories '6' are not matched at all --- and there are some of them
 within this hierarchy! At least these I expect to be listed!

In all of your examples, rsync's behavior is correct.  The core and update
directories are excluded by the - *, so rsync never even goes inside to check
for 6 directories.  The man page explains this:

``Note that, when using the --recursive (-r) option (which is implied by -a),
every subcomponent of every path is visited from the top down, so
include/exclude patterns get applied recursively to each subcomponent's full
name (e.g. to include /foo/bar/baz the subcomponents /foo and /foo/bar
must not be excluded).  The exclude patterns actually short-circuit the
directory traversal stage when rsync finds the files to send.  If a pattern
excludes a particular parent directory, it can render a deeper include pattern
ineffectual because rsync did not descend through that excluded section of the
hierarchy.  This is particularly important when using a trailing '*' rule.  For
instance, this won't work:

+ /some/path/this-file-will-not-be-found
+ /file-is-included
- *

This fails because the parent directory some is excluded by the '*' rule, so
rsync never visits any of the files in the some or some/path directories.''


-- 
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.
-- 
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 4764] Wrong include/exclude descriptions

2007-07-05 Thread samba-bugs
https://bugzilla.samba.org/show_bug.cgi?id=4764


[EMAIL PROTECTED] changed:

   What|Removed |Added

 Status|REOPENED|RESOLVED
 Resolution||INVALID




--- Comment #5 from [EMAIL PROTECTED]  2007-07-05 18:06 CST ---
It would be better to ask questions about how to understand includes on the
mailing list.


-- 
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.
-- 
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 4764] Wrong include/exclude descriptions

2007-07-05 Thread samba-bugs
https://bugzilla.samba.org/show_bug.cgi?id=4764





--- Comment #7 from [EMAIL PROTECTED]  2007-07-05 19:33 CST ---
OK:
+ /some/path/this-file-will-not-be-found
+ /file-is-included
- *

This fails because the parent directory some is excluded by the '*' rule, so
rsync never visits any of the files in the some or some/path directories.''

If I interpret correctly, what this states, it means '/**/6/' is useless
combined with '- *', since no directory will ever be matched, since you are not
expanding first to find a match for '/**/6/'? It is not clear.

The same is with

+ 6/
- *

are you traversing all directories, or just reading the contents of the one we
are in? The manpage states that '+ 6/ finds any directory named '6'. Thus I
assume you traversing all available directories first, looking for one matching
'6'? If this is not true, meaning you are testing within the directory we are
in if there is no match (one named '6') discarding them, never traversing down
the tree?

This is not clearly stated. I am missing a clear description what is matched by
all those rules spawning more than just one directory:

+ **/
+ /**/
+ 6/ (implicitly something like (**/6/)


If you are assuming

/fedora/core/6

you are reading only

/fedora

comparing against '/**/6/'. Since this does not match the '- *' is applied.
This matches. The directory is removed?! I'd assume with

+ /**/6/
- *

you'd try to find a match expanding until there is none. Meaning:

/fedora has subdirectory /core has subdirectory /6, this matches /**/6, since
/**/ matches any path, thus /fedora/core/6 is matched. If this isn't done,
state it clearly. '/**/6' this way will never match anything if followed by a
rule like '- *'.

If you are in need of including only certain deeply nested subdirectories the
includes are not not of use in most cases and the only way transfering deeply
nested directories would be to analyze a whole directory traversal by rsync
feeding the output into grep, sed, or any tool capable of handling strings
efficiently, creating an include file yourself.


-- 
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.
-- 
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 4764] Wrong include/exclude descriptions

2007-07-05 Thread samba-bugs
https://bugzilla.samba.org/show_bug.cgi?id=4764


[EMAIL PROTECTED] changed:

   What|Removed |Added

 Status|REOPENED|RESOLVED
 Resolution||INVALID




--- Comment #8 from [EMAIL PROTECTED]  2007-07-05 19:44 CST ---
Please leave this closed.


-- 
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.
-- 
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 4764] Wrong include/exclude descriptions

2007-07-05 Thread samba-bugs
https://bugzilla.samba.org/show_bug.cgi?id=4764





--- Comment #9 from [EMAIL PROTECTED]  2007-07-05 20:00 CST ---
Also, check out the description of short-circuiting the descent in the man
page:

http://rsync.samba.org/ftp/rsync/rsync.html

This appears near the start of the INCLUDE/EXCLUDE PATTERN RULES section
(right after the list of pattern types).


-- 
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.
-- 
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 4764] Wrong include/exclude descriptions

2007-07-05 Thread samba-bugs
https://bugzilla.samba.org/show_bug.cgi?id=4764





--- Comment #10 from [EMAIL PROTECTED]  2007-07-05 20:16 CST ---
(In reply to comment #7)
 OK:
 + /some/path/this-file-will-not-be-found
 + /file-is-included
 - *
 
 This fails because the parent directory some is excluded by the '*' rule, so
 rsync never visits any of the files in the some or some/path 
 directories.''
 
 If I interpret correctly, what this states, it means '/**/6/' is useless
 combined with '- *', since no directory will ever be matched, since you are 
 not
 expanding first to find a match for '/**/6/'? It is not clear.

Did you read the previous paragraph?  It says, If a pattern excludes a
particular parent directory, it can render a deeper include pattern ineffectual
because rsync did not descend through that excluded section of the hierarchy. 
To me, this makes it clear that an exclude pattern cuts rsync off altogether
from scanning a subtree of the source so that files inside that subtree are
never even considered for transmission, whether or not they would be included
according to your rules.  There is nothing in the man page to justify the
interpretation that rsync expand[s] first to find a match for '/**/6/'.

 The same is with
 
 + 6/
 - *
 
 are you traversing all directories, or just reading the contents of the one we
 are in?  The manpage states that '+ 6/ finds any directory named '6'.

No, nowhere does the manpage state that include patterns find anything.  '+
6/' matches and includes any directory named '6' *if and when* such a directory
is encountered during the traversal.

 Thus I
 assume you traversing all available directories first, looking for one 
 matching
 '6'? If this is not true, meaning you are testing within the directory we are
 in if there is no match (one named '6') discarding them, never traversing down
 the tree?
 
 This is not clearly stated.

I'm ignoring this because it is based on a statement that isn't in the manpage.

 I am missing a clear description what is matched by
 all those rules spawning more than just one directory:
 
 + **/
 + /**/
 + 6/ (implicitly something like (**/6/)
 
 
 If you are assuming
 
 /fedora/core/6
 
 you are reading only
 
 /fedora
 
 comparing against '/**/6/'. Since this does not match the '- *' is applied.
 This matches. The directory is removed?!

Correct.

 I'd assume with
 
 + /**/6/
 - *
 
 you'd try to find a match expanding until there is none. Meaning:
 
 /fedora has subdirectory /core has subdirectory /6, this matches /**/6, since
 /**/ matches any path, thus /fedora/core/6 is matched.

There is nothing in the manpage to justify this assumption.  If you are misled
by your own faulty assumption, that's your fault, not rsync's.

 If this isn't done,
 state it clearly. '/**/6' this way will never match anything if followed by a
 rule like '- *'.

The example I quoted from the manpage is intended to explain just that:

``For instance, this won't work:

+ /some/path/this-file-will-not-be-found
+ /file-is-included
- *

This fails because the parent directory some is excluded by the '*' rule, so
rsync never visits any of the files in the some or some/path directories.''

Granted, that example isn't as explicit as it possibly could be that the first
rule has no effect, but it ought to be enough to catch the attention of people
using a similar filter file (like you) and get them to read the rest of the
description so they understand why it won't work.

 If you are in need of including only certain deeply nested subdirectories the
 includes are not not of use in most cases and the only way transfering deeply
 nested directories would be to analyze a whole directory traversal by rsync
 feeding the output into grep, sed, or any tool capable of handling strings
 efficiently, creating an include file yourself.

No, the man page goes on to explain another alternative:

``One solution is to ask for all directories in the hierarchy to be included by
using a single rule: + */ (put it somewhere before the - * rule), and
perhaps use the --prune-empty-dirs option.''

If you wanted rsync to provide an easier way to include only certain
subdirectories, that would be a legitimate feature request.


-- 
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.
-- 
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 4764] New: Wrong include/exclude descriptions

2007-07-04 Thread samba-bugs
https://bugzilla.samba.org/show_bug.cgi?id=4764

   Summary: Wrong include/exclude descriptions
   Product: rsync
   Version: 2.6.8
  Platform: Other
OS/Version: Linux
Status: NEW
  Severity: normal
  Priority: P3
 Component: core
AssignedTo: [EMAIL PROTECTED]
ReportedBy: [EMAIL PROTECTED]
 QAContact: [EMAIL PROTECTED]


The manpage states:
 - foo/ would exclude any directory named foo

But:
+ */
- i386/
This should include all directories, then exclude any i386-directory. Having a
look at what rsync does:
i386/debug/xorg-x11-drv-i810-debuginfo-1.6.5-10.fc6.i386.rpm is uptodate
i386/debug/xorg-x11-drv-mga-debuginfo-1.4.5-2.fc6.i386.rpm is uptodate
i386/debug/xorg-x11-drv-mouse-debuginfo-1.2.1-1.fc6.i386.rpm is uptodate
i386/debug/xorg-x11-drv-s3-debuginfo-0.5.0-1.fc6.i386.rpm is uptodate
i386/debug/xorg-x11-drv-savage-debuginfo-2.1.2-3.fc6.i386.rpm is uptodate
i386/debug/xorg-x11-drv-tdfx-debuginfo-1.3.0-2.fc6.i386.rpm is uptodate
i386/debug/xorg-x11-drv-trident-debuginfo-1.2.3-1.fc6.i386.rpm is uptodate
i386/debug/xorg-x11-server-debuginfo-1.1.1-47.10.fc6.i386.rpm is uptodate
i386/debug/xorg-x11-server-debuginfo-1.1.1-47.8.fc6.i386.rpm is uptodate
i386/debug/xorg-x11-server-debuginfo-1.1.1-47.9.fc6.i386.rpm is uptodate
i386/debug/xorg-x11-xinit-debuginfo-1.0.2-15.fc6.i386.rpm is uptodate

i386-Directories are included.


+ */
- */
This should include all directories, then exclude them all. rsync:
x86_64/debug/repodata/filelists.xml.gz
x86_64/debug/repodata/other.xml.gz
x86_64/debug/repodata/primary.xml.gz
x86_64/debug/repodata/repomd.xml
x86_64/repodata/filelists.xml.gz
x86_64/repodata/other.xml.gz
x86_64/repodata/primary.xml.gz
x86_64/repodata/repomd.xml
x86_64/repodata/updateinfo.xml.gz

All directories are included and finaly transfered.


+ */
- *
This should include all directories, then exclude all files or directories.
rsync:

This works as expected.


+ i386
- *
This should include all i386 directories, then exclude all files. rsync:

No files transfered.


+ i386/
- *
This should include all i386-directories, then exclude all files. rsync:

No files transfered, directory created.


+ i386**
- *
This should include all i386-directories and files, excluding all others.
rsync:
i386/debug/repodata/other.xml.gz is uptodate
i386/debug/repodata/primary.xml.gz is uptodate
i386/debug/repodata/repomd.xml is uptodate
i386/repodata/filelists.xml.gz is uptodate
i386/repodata/other.xml.gz is uptodate
i386/repodata/primary.xml.gz is uptodate

This is OK, but only if the i386-directory is at transfer root. Any other
i386-directory will not be transfered at all!


+ i386/
+ i386/*
- *
This should include the i386-directory and files. rsync:
i386/xsane-0.994-2.fc6.i386.rpm is uptodate
i386/xsane-gimp-0.994-2.fc6.i386.rpm is uptodate
i386/xterm-225-1.fc6.i386.rpm is uptodate
i386/yelp-2.16.0-13.fc6.i386.rpm is uptodate
i386/ypbind-1.19-7.fc6.i386.rpm is uptodate
i386/yum-3.0.6-1.fc6.noarch.rpm is uptodate
i386/yum-metadata-parser-1.0.3-1.fc6.i386.rpm is uptodate

This is OK.


Taking the description and a file hirarchy as given below (found on
rsync://mirrors.kernel.org/:
fedora
fedora/core
fedora/core/updates
fedora/core/updates/6
fedora/core/updates/6/ppc
fedora/core/updates/6/ppc/debug
fedora/core/updates/6/ppc/debug/repodata
fedora/core/updates/6/ppc/repodata
fedora/core/updates/6/x86_64
fedora/core/updates/6/x86_64/debug
fedora/core/updates/6/x86_64/debug/repodata
fedora/core/updates/6/x86_64/repodata
fedora/core/updates/6/i386
fedora/core/updates/6/i386/debug
fedora/core/updates/6/i386/debug/repodata
fedora/core/updates/6/i386/repodata
fedora/core/updates/6/SRPMS
fedora/core/updates/6/SRPMS/repodata
fedora/core/6
fedora/core/6/ppc
fedora/core/6/ppc/iso
fedora/core/6/ppc/debug
fedora/core/6/ppc/debug/repodata
fedora/core/6/ppc/os
fedora/core/6/ppc/os/ppc
fedora/core/6/ppc/os/ppc/iSeries
fedora/core/6/ppc/os/ppc/chrp
fedora/core/6/ppc/os/ppc/mac
fedora/core/6/ppc/os/ppc/ppc32
fedora/core/6/ppc/os/ppc/ppc64
fedora/core/6/ppc/os/Fedora
fedora/core/6/ppc/os/Fedora/base
fedora/core/6/ppc/os/Fedora/RPMS
fedora/core/6/ppc/os/stylesheet-images
fedora/core/6/ppc/os/images
fedora/core/6/ppc/os/images/iSeries
fedora/core/6/ppc/os/images/netboot
fedora/core/6/ppc/os/etc
fedora/core/6/ppc/os/repodata
fedora/core/6/x86_64
fedora/core/6/x86_64/iso
fedora/core/6/x86_64/debug
fedora/core/6/x86_64/debug/repodata
fedora/core/6/x86_64/os
fedora/core/6/x86_64/os/Fedora
fedora/core/6/x86_64/os/Fedora/base
fedora/core/6/x86_64/os/Fedora/RPMS
fedora/core/6/x86_64/os/stylesheet-images
fedora/core/6/x86_64/os/isolinux
fedora/core/6/x86_64/os/images
fedora/core/6/x86_64/os/images/xen
fedora/core/6/x86_64/os/images/pxeboot
fedora/core/6/x86_64/os/repodata
fedora/core/6/source
fedora/core/6/source/iso
fedora/core/6/source/SRPMS
fedora/core/6/source/SRPMS/repodata
fedora/core/6/i386
fedora/core/6/i386/iso
fedora/core/6/i386/debug
fedora

DO NOT REPLY [Bug 4764] Wrong include/exclude descriptions

2007-07-04 Thread samba-bugs
https://bugzilla.samba.org/show_bug.cgi?id=4764


[EMAIL PROTECTED] changed:

   What|Removed |Added

 CC||[EMAIL PROTECTED]




--- Comment #1 from [EMAIL PROTECTED]  2007-07-04 13:51 CST ---
The same ist for rsync 2.6.9.


-- 
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.
-- 
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 4764] Wrong include/exclude descriptions

2007-07-04 Thread samba-bugs
https://bugzilla.samba.org/show_bug.cgi?id=4764


[EMAIL PROTECTED] changed:

   What|Removed |Added

 Status|NEW |RESOLVED
 Resolution||INVALID




--- Comment #2 from [EMAIL PROTECTED]  2007-07-04 14:05 CST ---
Please re-read the exclude section of the man page.  It describes how the first
match is the one that takes effect, so a directory exclude that follows a */
include will never be seen.  Just change the order of the rules so that the
exceptions come before the general rules and it will work fine.


-- 
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.
-- 
To unsubscribe or change options: https://lists.samba.org/mailman/listinfo/rsync
Before posting, read: http://www.catb.org/~esr/faqs/smart-questions.html


include/exclude

2007-01-16 Thread Julian Pace Ross

Hi all,

I've read the man page but still seem to be a bit confused:

Is it possible to specify include/exclude rules to transfer files, for 
example of type *.c and *abc, and exclude everything else?


I am trying to avoid using --filter, since the list of patterns can be quite 
long and can change often, and since there is no --filter-from=FILE, my aim 
is to use the --include-from= and --exclude-from= files.


I tried putting *.c and *.abc in the include file, and * in the exclude 
file, but nothing gets transferred.

Tried a couple of other configurations but still nothing.

Any help?

Regards
Julian 



--
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: include/exclude

2007-01-16 Thread Christophe LYON

You can still use --filter: --filter=: my-rsync-filter
will include the file my-rsync-filter in the list of rules (and 
recursively at each directory level).


This is very powerful and allows you to modify the filters without 
modifying the script which calls rsync.


Christophe.


On 16.01.2007 14:28, Julian Pace Ross wrote:

Hi all,

I've read the man page but still seem to be a bit confused:

Is it possible to specify include/exclude rules to transfer files, for 
example of type *.c and *abc, and exclude everything else?


I am trying to avoid using --filter, since the list of patterns can be 
quite long and can change often, and since there is no 
--filter-from=FILE, my aim is to use the --include-from= and 
--exclude-from= files.


I tried putting *.c and *.abc in the include file, and * in the exclude 
file, but nothing gets transferred.

Tried a couple of other configurations but still nothing.

Any help?

Regards
Julian



--
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: include/exclude

2007-01-16 Thread Julian Pace Ross

OK thanks!

- Original Message - 
From: Christophe LYON [EMAIL PROTECTED]

To: Julian Pace Ross [EMAIL PROTECTED]; rsync@lists.samba.org
Sent: Tuesday, January 16, 2007 2:54 PM
Subject: Re: include/exclude



You can still use --filter: --filter=: my-rsync-filter
will include the file my-rsync-filter in the list of rules (and 
recursively at each directory level).


This is very powerful and allows you to modify the filters without 
modifying the script which calls rsync.


Christophe.


On 16.01.2007 14:28, Julian Pace Ross wrote:

Hi all,

I've read the man page but still seem to be a bit confused:

Is it possible to specify include/exclude rules to transfer files, for 
example of type *.c and *abc, and exclude everything else?


I am trying to avoid using --filter, since the list of patterns can be 
quite long and can change often, and since there is no 
--filter-from=FILE, my aim is to use the --include-from= and 
--exclude-from= files.


I tried putting *.c and *.abc in the include file, and * in the exclude 
file, but nothing gets transferred.

Tried a couple of other configurations but still nothing.

Any help?

Regards
Julian






--
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: include/exclude

2007-01-16 Thread Matt McCutchen

On 1/16/07, Julian Pace Ross [EMAIL PROTECTED] wrote:

[...] there is no --filter-from=FILE [...]


The exact equivalent to --filter-from=FILE is --filter=. FILE .
--filter=: FILE is similar but checks for a file by that name in
each subdirectory for patterns that should apply to that subdirectory.
If you want the same set of patterns for the entire transfer, it is
probably better to use the --filter=. FILE version.


I tried putting *.c and *.abc in the include file, and * in the exclude
file, but nothing gets transferred.


(1) Make sure you are specifying the include file before the exclude
file on the command line so that the include patterns take precedence.

(2) Your patterns also apply to directories, so rsync will skip
directories whose names do not end in .c or .abc , and as a result, it
will never even consider the files inside.  To avoid this, add an
include pattern */ to include all directories, and then you might like
to pass the option --prune-empty-dirs .

Matt
--
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: include/exclude

2007-01-16 Thread Julian Pace Ross
Thanks for the insight! 
Up and running now.



- Original Message - 
From: Matt McCutchen [EMAIL PROTECTED]

To: Julian Pace Ross [EMAIL PROTECTED]
Cc: rsync@lists.samba.org
Sent: Tuesday, January 16, 2007 6:40 PM
Subject: Re: include/exclude



On 1/16/07, Julian Pace Ross [EMAIL PROTECTED] wrote:

[...] there is no --filter-from=FILE [...]


The exact equivalent to --filter-from=FILE is --filter=. FILE .
--filter=: FILE is similar but checks for a file by that name in
each subdirectory for patterns that should apply to that subdirectory.
If you want the same set of patterns for the entire transfer, it is
probably better to use the --filter=. FILE version.


I tried putting *.c and *.abc in the include file, and * in the exclude
file, but nothing gets transferred.


(1) Make sure you are specifying the include file before the exclude
file on the command line so that the include patterns take precedence.

(2) Your patterns also apply to directories, so rsync will skip
directories whose names do not end in .c or .abc , and as a result, it
will never even consider the files inside.  To avoid this, add an
include pattern */ to include all directories, and then you might like
to pass the option --prune-empty-dirs .

Matt



--
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: Include Exclude .. a canonical way

2006-02-25 Thread Harry Putnam
Matt McCutchen [EMAIL PROTECTED] writes:

 On Wed, 2006-02-22 at 11:24 -0800, Wayne Davison wrote:
 rsync -avO --prune-empty-dirs --include=bookmarks.xml 
--filter='-! */' ~/.kde* some:dest/

 I just discovered a way to transfer certain files and folders a few
 levels below a generic exclude rule without having to include everything
 on the way; in hindsight it seems so obvious that I'm really surprised
 no one has discovered it yet.  End your exclude rules in * instead of
 **, use --relative, and just list all the things you want included!  The
 source arguments sneak under the generic exclude rule.  Example:
   rsync --exclude=/.kde* --relative ~/./ \
 ~/./.kde3.5/share/apps/konqueror/bookmarks.xml dest/

Nice, but what else might the --relative inclusion do? I remember some
time in the past having that set in rsnaphshot config and ending up
with a really confusing directory structure under the backup dest.

(May have had something like --copy-unsafe-links in there too)

Maybe if I leave out any `link' rules (which I currently do) it will
have no effect other than the one you describe?

-- 
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: Include Exclude .. a canonical way

2006-02-25 Thread Matt McCutchen
On Sat, 2006-02-25 at 10:27 -0600, Harry Putnam wrote:
 Matt McCutchen [EMAIL PROTECTED] writes:
  rsync --exclude=/.kde* --relative ~/./ \
  ~/./.kde3.5/share/apps/konqueror/bookmarks.xml dest/
 
 Nice, but what else might the --relative inclusion do? I remember some
 time in the past having that set in rsnaphshot config and ending up
 with a really confusing directory structure under the backup dest.

All --relative does is cause rsync to duplicate the source path (minus
any leading /) inside the destination.  For example, the command
cd /  rsync usr/ home/matt/ /backup/
mixes my personal files with bin, lib, share, src, and so forth
immediately inside the backup folder.  But
cd /  rsync --relative usr/ home/matt/ /backup/
creates /backup/usr and /backup/home/matt .

--relative is useful when you are copying multiple sources and want them
to wind up in the same locations relative to each other in the
destination, whether you copy all the sources in one rsync command or
each source in its own command.  Rsnapshot passes --relative by default
and runs a separate rsync command for each backup entry in the
configuration file.  Given this configuration file:
snapshot_root   /snapshots/
backup  /home/  localhost/
backup  /etc/   localhost/
backup  /usr/local/ localhost/
rsnapshot runs:
rsync other-options --relative /home/ /snapshots/localhost/
rsync other-options --relative /etc/ /snapshots/localhost/
rsync other-options --relative /usr/local/ /snapshots/localhost/
and the following directories are created:
/snapshots/localhost/home
/snapshots/localhost/etc
/snapshots/localhost/usr/local

A configuration file like this...
snapshot_root   /snapshots/
backup  /home/  localhost/home/
backup  /etc/   localhost/etc/
backup  /usr/local/ localhost/usr/local/
will create the following really confusing directory structure unless
you turn --relative off by setting rsync_long_args:
/snapshots/localhost/home/home
/snapshots/localhost/etc/etc
/snapshots/localhost/usr/local/usr/local

So --relative is useful if you set the destination path appropriately.
However, in some cases you may only want to duplicate a suffix of the
source path inside the destination; to do that, put a ./ in front of
that suffix.  The command
rsync --exclude=/.kde* --relative ~/ \
~/.kde3.5/share/apps/konqueror/bookmarks.xml /dest/
would create /dest/home/harry/ and /dest/home/harry/.kde3.5/share/
apps/konqueror/bookmarks.xml , but your original command matched your
home directory with /dest/ itself.  Using ./ gives the desired behavior:
rsync --exclude=/.kde* --relative ~/./ \
~/./.kde3.5/share/apps/konqueror/bookmarks.xml /dest/
Now you get /dest/.kde3.5/share/apps/konqueror/bookmarks.xml because the
part of the source path after the ./ is duplicated inside the
destination.
-- 
Matt McCutchen
[EMAIL PROTECTED]
http://hashproduct.metaesthetics.net/

-- 
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: Include Exclude .. a canonical way

2006-02-25 Thread Harry Putnam
Matt McCutchen [EMAIL PROTECTED] writes:

 All --relative does is cause rsync to duplicate the source path (minus
 any leading /) inside the destination.  For example, the command
   cd /  rsync usr/ home/matt/ /backup/
 mixes my personal files with bin, lib, share, src, and so forth
 immediately inside the backup folder.  But
   cd /  rsync --relative usr/ home/matt/ /backup/
 creates /backup/usr and /backup/home/matt .

Thanks for the complicated explanation... As you've guessed I have a
pretty thin understanding of how that works.

I haven't really understood all you had to say yet and will need to go
thru it a few times and experiment with it.  I always have trouble
with visualizing things... probaby partially dyslexic or something.

However It can do more than your saying there I think when symlinks
are involved it can have unexpected results.

See this thread on gmane that nobody responded too.  You'll notice I
had an even murkier understanding then but still what was happening
was a really confusing directory structure:

http://thread.gmane.org/gmane.comp.sysutils.backup.rsnapshot.general/742

-- 
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: Include Exclude .. a canonical way

2006-02-25 Thread Matt McCutchen
On Sat, 2006-02-25 at 19:20 -0600, Harry Putnam wrote:
 However It can do more than your saying there I think when symlinks
 are involved it can have unexpected results.
 
 See this thread on gmane that nobody responded too.  You'll notice I
 had an even murkier understanding then but still what was happening
 was a really confusing directory structure:
 
 http://thread.gmane.org/gmane.comp.sysutils.backup.rsnapshot.general/742

From that thread:
 The whole SOURCE path is mirrored in there [...].

You have captured the effect of --relative in one sentence.  That's all
there is to it!  As far as I can tell, the symlink from /home/reader
to /anex2/reader had nothing to do with the behavior because your
rsnapshot.conf never mentioned /home/reader.

On the other hand, if /anex2/reader had been a symlink, some strange
things might have happened.  If you want the details of the interactions
between symlinks and --relative, read the new explanation of
--no-implied-dirs in the CVS rsync man page:
http://www.samba.org/cvsweb/rsync/rsync.yo

Playing with rsync is probably the best way to figure out what it does
in different cases.  In fact, I have a directory ~/tmp dedicated to
rsync experimentation; an assortment of source and destination
directories has accumulated inside it as I have investigated various
behaviors and issues.
-- 
Matt McCutchen
[EMAIL PROTECTED]
http://hashproduct.metaesthetics.net/

-- 
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: Include Exclude .. a canonical way

2006-02-25 Thread Wayne Davison
On Sat, Feb 25, 2006 at 08:54:46PM -0500, Matt McCutchen wrote:
   http://www.samba.org/cvsweb/rsync/rsync.yo

If you'd prefer to see the man page in HTML format instead of raw yodl,
the version from the last nightly tar file is always found here:

http://rsync.samba.org/ftp/rsync/nightly/rsync.html

..wayne..
-- 
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: Include Exclude .. a canonical way

2006-02-23 Thread Matt McCutchen
On Wed, 2006-02-22 at 11:24 -0800, Wayne Davison wrote:
 rsync -avO --prune-empty-dirs --include=bookmarks.xml 
 --filter='-! */' ~/.kde* some:dest/

I just discovered a way to transfer certain files and folders a few
levels below a generic exclude rule without having to include everything
on the way; in hindsight it seems so obvious that I'm really surprised
no one has discovered it yet.  End your exclude rules in * instead of
**, use --relative, and just list all the things you want included!  The
source arguments sneak under the generic exclude rule.  Example:
rsync --exclude=/.kde* --relative ~/./ \
~/./.kde3.5/share/apps/konqueror/bookmarks.xml dest/

If you need to transfer a file or folder that matches a generic exclude
rule instead of merely being under a generic exclude rule, you need a
single higher-priority include rule specific to that file or folder,
just as you would if you didn't list the file or folder as a source
path.  If you just generate a source argument and a single high-priority
specific include rule for each thing you want to transfer, rsync will do
what you expect.

I've tried this approach with rsync-acl 2.6.7pre2 and it seems to work.
Note the ./ that marks the start of --relative path information; this
syntax was introduced in 2.6.7.  This approach improves upon the use of
--prune-empty-dirs in that the latter might omit empty directories that
you actually want; it also handles 99% of the cases that the traverse
sender filters I proposed would handle.
-- 
Matt McCutchen
[EMAIL PROTECTED]
http://hashproduct.metaesthetics.net/

-- 
To unsubscribe or change options: https://lists.samba.org/mailman/listinfo/rsync
Before posting, read: http://www.catb.org/~esr/faqs/smart-questions.html


Include Exclude .. a canonical way

2006-02-22 Thread Harry Putnam
I'm wrestling with include/exclude rules and not finding a way to do
this:

Simplified command: rsync -avv --exclcude-from=rsync_exclude \
~/ /dest/

Backup ~/ including ~/.kde3.5/share/apps/konqueror/bookmarks.xml
but excluding everything else under ~/.kde3.5

Here are some of what hasn't worked in an EXCLUDE file.

+ /.kde3.5/share/apps/konqueror/bookmarks.xml
/.kde3.5/

+ .kde3.5/share/apps/konqueror/bookmarks.xml
/.kde3.5**

+ .kde3.5/share/apps/konqueror/bookmarks.xml
.kde3.5/

There are a number of other combos I've tried but still not getting
the results I want.  

The coverage in `man rsync' seems too general to get a working example
of doing this.

-- 
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: Include Exclude .. a canonical way

2006-02-22 Thread Harry Putnam
Harry Putnam [EMAIL PROTECTED] writes:

 Here are some of what hasn't worked in an EXCLUDE file.

 + /.kde3.5/share/apps/konqueror/bookmarks.xml
 /.kde3.5/

 + .kde3.5/share/apps/konqueror/bookmarks.xml
 /.kde3.5**

 + .kde3.5/share/apps/konqueror/bookmarks.xml
 .kde3.5/

 There are a number of other combos I've tried but still not getting
 the results I want.  

 The coverage in `man rsync' seems too general to get a working example
 of doing this.

That last bit about the manual being too general was wrong.  It does
include an example that let me find the solution but first one more 
failure should be listed.  This fails:
  + /.kde3.5/share/
  + /.kde3.5/share/apps/
  + /.kde3.5/share/apps/konqueror/
  + /.kde3.5/share/apps/konqueror/bookmarks.xml
  - /.kde3.5/*

However using a double asterisk makes it all work:

  + /.kde3.5/share/
  + /.kde3.5/share/apps/
  + /.kde3.5/share/apps/konqueror/
  + /.kde3.5/share/apps/konqueror/bookmarks.xml
  - /.kde3.5/*

Moves only the bookmarks file

Still it seems there would be a more succinct way...

-- 
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: Include Exclude .. a canonical way

2006-02-22 Thread Wayne Davison
On Wed, Feb 22, 2006 at 05:14:29AM -0600, Harry Putnam wrote:
 Still it seems there would be a more succinct way...

There is if you use rsync 2.6.7 (currently in release testing):

rsync -avO --prune-empty-dirs --include=bookmarks.xml 
  --filter='-! */' ~/.kde* some:dest/

This tells rsync to descend through all the ~/.kde* directories that
exist on the sender side and look for one or more bookmarks.xml files.
The --prune-empty-dirs option is new, and ensures that you only create
the directories necessary to hold the bookmarks.xml files.  Notes: the
filter option means exclude everything that is not a directory, and
the -O option avoids changing the modify-time on the directories.

..wayne..
-- 
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: Include Exclude .. a canonical way

2006-02-22 Thread Harry Putnam
Wayne Davison [EMAIL PROTECTED] writes:

 On Wed, Feb 22, 2006 at 05:14:29AM -0600, Harry Putnam wrote:
 Still it seems there would be a more succinct way...

 There is if you use rsync 2.6.7 (currently in release testing):

 rsync -avO --prune-empty-dirs --include=bookmarks.xml 
 --filter='-! */' ~/.kde* some:dest/

 This tells rsync to descend through all the ~/.kde* directories that
 exist on the sender side and look for one or more bookmarks.xml files.
 The --prune-empty-dirs option is new, and ensures that you only create
 the directories necessary to hold the bookmarks.xml files.  Notes: the
 filter option means exclude everything that is not a directory, and
 the -O option avoids changing the modify-time on the directories.

Nice .. since I am testing 6.7.  I just built it yesterday and
installed in a test --prefix..

The code I posted did already create only those dirs necessary to
house bookmarks.xml but it took a lot more dinking around to find the
right directories to include and so forth.  This looks  less
cumbersome and time consuming.  It will require close attention to the
man page and experimentation though.  And I'll have to move the test
install into production.

For me production is not too serious though... just a home boy single
user with lots of data.

That seems to be the big problem for me.  I don't look at rsync for
long periods and then when the time comes to finally get into it, I've
forgotten all I ever picked up and end up back here flumoxed by the
ins and outs of include/exclude.

I think I'm probably being too picky about what gets backedup and
should probably just accept the room use hit and and get disked up
until I'm ahead of the 8 ball.  If one just backs up by directory
ignoring what may be in it, all of a sudden the rules get real
easy.. that is, there are none 
-- 
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 2240] Add last-match/short-circuit processing of include/exclude

2006-01-29 Thread bugzilla-daemon
https://bugzilla.samba.org/show_bug.cgi?id=2240


[EMAIL PROTECTED] changed:

   What|Removed |Added

 Status|ASSIGNED|RESOLVED
 Resolution||WONTFIX




--- Comment #8 from [EMAIL PROTECTED]  2006-01-29 01:39 MST ---
I think we don't need this.


-- 
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.
-- 
To unsubscribe or change options: https://lists.samba.org/mailman/listinfo/rsync
Before posting, read: http://www.catb.org/~esr/faqs/smart-questions.html


Dynamically determined include/exclude list.

2005-11-10 Thread Dave Mielke
Is there a way to define a module within rsyncd.conf such that its
include/exclude list is dynamically determined by executing a host command,
e.g. find? If it can't be done today, is it the sort of feature which would be
considered for future development?

-- 
Dave Mielke   | 2213 Fox Crescent | I believe that the Bible is the
Phone: 1-613-726-0014 | Ottawa, Ontario   | Word of God. Please contact me
EMail: [EMAIL PROTECTED] | Canada  K2A 1H7   | if you're concerned about Hell.
http://FamilyRadio.com/   | http://Mielke.cc/bible/
-- 
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: Dynamically determined include/exclude list.

2005-11-10 Thread Wayne Davison
On Thu, Nov 10, 2005 at 02:37:55PM -0500, Dave Mielke wrote:
 Is there a way to define a module within rsyncd.conf such that its
 include/exclude list is dynamically determined by executing a host command,
 e.g. find?

In the CVS version of rsync, you could specify a pre-xfer exec command
that could run anything you like (such as find).  However, the only way
that could affect what gets included/excluded in the already-started
transfer would be for you to use per-directory filter files.  For
example, if you have this filter rule in your config file:

filter = dir-merge .auto-filter

Rsync would look for filter rules in a file named .auto-filter in every
directory of the transfer and react accordingly.  See the manpage for
more details.

..wayne..
-- 
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: Dynamically determined include/exclude list.

2005-11-10 Thread Dave Mielke
[quoted lines by Wayne Davison on 2005/11/10 at 12:09 -0800]

In the CVS version of rsync, you could specify a pre-xfer exec command
that could run anything you like (such as find).  

Does this then write the output of, say, find to a file which is picked up
later (during the transfer) by something like include from?

However, the only way
that could affect what gets included/excluded in the already-started
transfer would be for you to use per-directory filter files.  For
example, if you have this filter rule in your config file:

What I'm looking for is the ability to only transfer files which meet a certain
set of criteria, e.g. only files which are owned by a certain user.

-- 
Dave Mielke   | 2213 Fox Crescent | I believe that the Bible is the
Phone: 1-613-726-0014 | Ottawa, Ontario   | Word of God. Please contact me
EMail: [EMAIL PROTECTED] | Canada  K2A 1H7   | if you're concerned about Hell.
http://FamilyRadio.com/   | http://Mielke.cc/bible/
-- 
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: Question about include/exclude rules

2005-06-30 Thread Wayne Davison
On Tue, Jun 28, 2005 at 02:22:22PM +0200, [EMAIL PROTECTED] wrote:
 Rsync works fine for me (the rules are reported below) except a point,
 rsync create an empty folders structure that I don'want.

The only way to get rsync to not create directory hierarchies that don't
contain *.txt files is to actually remove the directories from the
transfer, either through more targeted directory includes, or by using
--files-from (though the latter would not make it easy to delete missing
files).

So, instead of the + */ rule you would need to maintain some include
rules, perhaps using something like this perl script:

#!/usr/bin/perl
use strict;
my $dir = shift;
chdir($dir) or die Unable to chdir to $dir: $!\n;
print + *.txt\n;
my %hash;
open(IN, 'find . -name *.txt |') or die Failed to run find: $!\n;
while (IN) {
chomp;
s#^\./##;
next unless s#/[^/]*\.txt$##;
my $path = '';
foreach (split(/\//)) {
$path .= $_ . '/';
next if $hash{$path};
$hash{$path} = 1;
print + $path\n;
}
}
print - *\n;

And use it like this:

  new-script ./source | rsync -avz --delete-excluded --exclude-from=- ./source/ 
./dest

..wayne..
-- 
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: include/exclude - how to transfer /etc and /home/users from /?

2005-06-28 Thread Wayne Davison
On Mon, Jun 27, 2005 at 10:57:47PM +0200, Tomasz Chmielewski wrote:
 I just spent another hour reading the manual and trying to figure it 
 out, but I can't make it.

Did you also read the email I pointed you at?  Using the --files-from
option that it recommended would have been the easiest solution to your
problem.  The email also demonstrated the nested includes that are
needed to make sure that the recursive descent through the directory
hierarchy even makes it down to the directories you're interested in.
Namely that you need to include /home/ and /home/samba/ to even get to
/home/samba/profiles, and then you need to be sure to exclude everything
else you don't want.  I'd recommend trying --files-from first -- it's
much easier.

..wayne..
-- 
To unsubscribe or change options: https://lists.samba.org/mailman/listinfo/rsync
Before posting, read: http://www.catb.org/~esr/faqs/smart-questions.html


Question about include/exclude rules

2005-06-28 Thread l . corbo
Hi all,
I'm trying to made a filtered backup of a windows PC.
My target is to create a recursive backup of only files reported in the
include/exclude files (i.e. only *.txt).
the rules (reported below) work well, but also create an empty folders
structure that I don'want.

Rsync works fine for me (the rules are reported below) except a point,
rsync create an empty folders structure that I don'want.

I'm trying to explain better.

Suppose that the source folder is:

./source/a.txt
./source/afolder
./source/afolder/b.txt
./source/afolder/c.doc
./source/bfolder/
./source/bfolder/a.doc
./source/bfolder/
./source/bfolder/cfolder/
./source/bfolder/cfolder/e.doc
 .
I used the following syntax:

rsync -avz --delete-excluded ./source/ ./dest  --exclude-from=exclude.txt

where the rules in the exclude.txt are:

+ *.txt
+ */
- *

rsync create in the dest folder:

./dest/a.txt
./dest/afolder
./dest/afolder/b.txt
./dest/bfolder/
./dest/bfolder/cfolder/

Please note if I omit the rules + */, I cannot fetch recursively the
folders and thus the ./source/afolder/b.txt file.
I misleading anything?
There is anyway to exclude the creation of the empty folders?

My environment is:
Win XP Pro SP2
rsync 2.6.4 (from cygwin)

Thanks in advantage,

Luca

-- 
To unsubscribe or change options: https://lists.samba.org/mailman/listinfo/rsync
Before posting, read: http://www.catb.org/~esr/faqs/smart-questions.html


include/exclude - how to transfer /etc and /home/users from /?

2005-06-27 Thread Tomasz Chmielewski
I'm trying to copy recursively only /etc, /home/samba/profiles and 
/home/samba/shared.



To do so, I use this rsync command:

rsync --progress -v -u -a -z --stats \
--include=/etc \
--include=/home/samba/profiles \
--include=/home/samba/shared \
--exclude=/* \
--numeric-ids --delete-after -e ssh [EMAIL PROTECTED]:/ \
/home/samba/linuxbackup/latest/CON/


Unfortunately, it copies only /etc, it doesn't touch /home/samba/... 
directories I specified.


What am I doing wrong?

I spent an hour looking through include/exclude problems on this list, 
but I still can't figure out how can I transfer these three folders.


Note that I don't want to use a include/exclude file, as these all 
values are sitting in a script, and creating an additional file wouldn't 
be very handy.


Anyone?

--
Tomek
--
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: include/exclude - how to transfer /etc and /home/users from /?

2005-06-27 Thread Wayne Davison
On Mon, Jun 27, 2005 at 04:05:47PM +0200, Tomasz Chmielewski wrote:
 I'm trying to copy recursively only /etc, /home/samba/profiles and 
 /home/samba/shared.

The manpage explains how you need to include all directories on the way
down to the file/dir in the recursive descent.  Or just use --files-from
and it is usually much easier than trying to get the include/exclude
rules right.  Some examples of both the include/exclude syntax and the
--files-from syntax are in this recent email on the subject:

http://lists.samba.org/archive/rsync/2005-June/012846.html

..wayne..
-- 
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: include/exclude - how to transfer /etc and /home/users from /?

2005-06-27 Thread Tomasz Chmielewski

Wayne Davison schrieb:

On Mon, Jun 27, 2005 at 04:05:47PM +0200, Tomasz Chmielewski wrote:

I'm trying to copy recursively only /etc, /home/samba/profiles and 
/home/samba/shared.



The manpage explains how you need to include all directories on the way
down to the file/dir in the recursive descent.  Or just use --files-from
and it is usually much easier than trying to get the include/exclude
rules right.  Some examples of both the include/exclude syntax and the
--files-from syntax are in this recent email on the subject:

http://lists.samba.org/archive/rsync/2005-June/012846.html


sorry, I just can't make it work.

I just spent another hour reading the manual and trying to figure it 
out, but I can't make it.


--include=/etc \

this one works and the whole /etc is transferred.


--include=/home/samba/profiles \

this is similar to the /etc above, but it doesn't work at all, nothing 
from /home/samba/profiles is transferred



--include=/home/samba/shared \

nothing from /home/samba/shared is transferred


--exclude=/* \

this seem to work, as nothing from / is transferred (I don't need /proc 
or /usr).
But this also seem to exclude /home/samba/shared and 
/home/samba/profiles.



Perhaps it would be easier to use three different rsyncs:

[EMAIL PROTECTED]:/etc /home/CON/etc

[EMAIL PROTECTED]:/home/samba/profiles /home/CON/home/samba/profiles

[EMAIL PROTECTED]:/home/samba/shared /home/CON/home/samba/shared


but I see no reason why it should be three commands, instead of one 
(well, it seems hard to include and exclude the diredtories you want - 
at least for me).



--
Tomek
--
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: include/exclude client/server precedence

2005-03-15 Thread C. P.
ok, wayne:
thank you a lot, next question in another thread
now im using:
include =   [oO][uU][tT][lL][oO][oO][kK].[pP][sS][tT] 
[aA][lL][mM][aA][cC][eE][nN].[pP][sS][tT]

exclude = *.[pP][iI][fF] *.[iI][sS][oO] *.[mM][oO][vV] *.[mM][pP][33] 
*.[wW][aA][vV] *.[eE][xX][eE] *.[dD][lL][lL] *.[pP][sS][tT] *.[cC][oO][mM] 
*.[bB][aA][tT] *.[mM][pP][gG]   /Escritorio/publico/ Escritorio/personal/

in the global section of rsyncd.conf and works very well
carlos
 #rsync.conf
 [module]
 include = outlook.pst
 exclude = *.pst *.exe *.com *.mp3 etc...

 but as i have experienced, these rules only apply if are repeated as 
client
 options

They apply to the server, but not in the same way that client options do
(i.e. they have no effect whatsoever on the client, just the server).
This is mentioned in the rsyncd.conf (especiallly in a more modern
release).  The purpose of these options for the daemon is to completely
hide files so that they can't be downloaded from the server, and to
prevent those files from uploaded to the server (in a modern rsync).
For 2.6.4, you can instead create a server-file named .rsync-filter in
the root dir of the module.  Then, the client can specify -F and these
filter rules will be read-in during the processing.  When pulling, if
--delete-after is specified, the most recent version of the rules will
be applied to protect files from deletion (or the previous version of
the file will apply if another form of delete is used).  When pushing,
the client needs to have an up-to-date version of the file to prevent
the transfer of those files to the server.
..wayne..
_
Express yourself instantly with MSN Messenger! Download today it's FREE! 
http://messenger.msn.click-url.com/go/onm00200471ave/direct/01/

--
To unsubscribe or change options: https://lists.samba.org/mailman/listinfo/rsync
Before posting, read: http://www.catb.org/~esr/faqs/smart-questions.html


include/exclude client/server precedence

2005-03-11 Thread C. P.
Hello list:
Im a new user, poorly skilled programmer and dont understand the precedences 
of rules.

I understand that:
module options override global options
but i cant find the relationship between client options and server options.
What i want is to:
#rsync.conf
[module]
include = outlook.pst
exclude = *.pst *.exe *.com *.mp3 etc...
but as i have experienced, these rules only apply if are repeated as client 
options

Please explain me or give me a link
Thanks
Carlos Pantelides
_
FREE pop-up blocking with the new MSN Toolbar - get it now! 
http://toolbar.msn.click-url.com/go/onm00200415ave/direct/01/

--
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: include/exclude client/server precedence

2005-03-11 Thread Wayne Davison
On Fri, Mar 11, 2005 at 11:37:07AM -0300, C. P. wrote:
 #rsync.conf
 [module]
 include = outlook.pst
 exclude = *.pst *.exe *.com *.mp3 etc...
 
 but as i have experienced, these rules only apply if are repeated as client 
 options

They apply to the server, but not in the same way that client options do
(i.e. they have no effect whatsoever on the client, just the server).
This is mentioned in the rsyncd.conf (especiallly in a more modern
release).  The purpose of these options for the daemon is to completely
hide files so that they can't be downloaded from the server, and to
prevent those files from uploaded to the server (in a modern rsync).

For 2.6.4, you can instead create a server-file named .rsync-filter in
the root dir of the module.  Then, the client can specify -F and these
filter rules will be read-in during the processing.  When pulling, if
--delete-after is specified, the most recent version of the rules will
be applied to protect files from deletion (or the previous version of
the file will apply if another form of delete is used).  When pushing,
the client needs to have an up-to-date version of the file to prevent
the transfer of those files to the server.

..wayne..
-- 
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: include/exclude client/server precedence

2005-03-11 Thread C. P.
Wayne:
This is mentioned in the rsyncd.conf (especiallly in a more modern
release).  The purpose of these options for the daemon is to completely
hide files so that they can't be downloaded from the server, and to
this exactly what i want:
prevent those files from uploaded to the server (in a modern rsync).
i downloaded, compiled and installed 2.6.3. ok
rsyncd.conf 5 says:
 Because  this  exclude  list is not passed to the client it 
only applies on the
 server: that is, it excludes files received by a client when 
receiving  from  a
 server  and  files deleted on a server when sending to a 
server, but it doesn't
 exclude files from being deleted on a client when receiving 
from a server.

what i want is to get complete control over what can the client upload. i 
dont want to backup 5G of mp3 for each client, burn it!. neither want a 
smart client editing my rsync.bat and changing the filters.

tried two ways:
1)
include = outlook.pst,
exclude = *.pif *.iso *.mov *.mp3 *.wav *.exe *.dll *.pst *.com *.bat *.mpg
and
2)
exclude = +outlook.pst  -*.pif -*.iso -*.mov -*.mp3 -*.wav -*.exe -*.dll 
-*.pst -*.com -*.bat -*.mpg
this way didnot work

the clients are 2.4.6 and 2.5.1 on windows.
2.5.1 doesnt pay attention to server excludes
2.4.6 does, but not to server includes (way 1)
another hint?
thank you
carlos
_
Express yourself instantly with MSN Messenger! Download today it's FREE! 
http://messenger.msn.click-url.com/go/onm00200471ave/direct/01/

--
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: include/exclude client/server precedence

2005-03-11 Thread Wayne Davison
On Fri, Mar 11, 2005 at 05:58:25PM -0300, C. P. wrote:
 include = outlook.pst,
 exclude = *.pif *.iso *.mov *.mp3 *.wav *.exe *.dll *.pst *.com *.bat *.mpg

As long as your server is 2.6.3 or newer, that will prevent any of those
file extensions from being uploaded to the server.  You'll see messages
like this when a client tries to send such a file:

skipping server-excluded file foo.iso

Your include line is wrong, though -- the trailing comma on the name
is a part of the filename (names are space separated).

Also, your example with +/- prefixes needed to have a single space in
between the +/- and the name (rsync avoids splitting at that infix
space).

..wayne..
-- 
To unsubscribe or change options: https://lists.samba.org/mailman/listinfo/rsync
Before posting, read: http://www.catb.org/~esr/faqs/smart-questions.html


[Bug 2240] Add last-match/short-circuit processing of include/exclude

2005-02-25 Thread samba-bugs
https://bugzilla.samba.org/show_bug.cgi?id=2240





--- Additional Comments From [EMAIL PROTECTED]  2005-02-25 10:05 ---
I considered the short-circuit operators (-! and +!) for filter commands, but I
am not convinced of their utility.  Do you have an example of a real-life
situation that they improve?

Note also that the suggested syntax for the new operators is now being used to
specify a rule that triggers when the pattern fails to match (such as -! */)
so if this idiom is needed it would need a new syntax (perhaps -* and +*).

-- 
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.
-- 
To unsubscribe or change options: https://lists.samba.org/mailman/listinfo/rsync
Before posting, read: http://www.catb.org/~esr/faqs/smart-questions.html


[Bug 2240] Add last-match/short-circuit processing of include/exclude

2005-02-25 Thread samba-bugs
https://bugzilla.samba.org/show_bug.cgi?id=2240





--- Additional Comments From [EMAIL PROTECTED]  2005-02-25 10:00 ---
Created an attachment (id=985)
 -- (https://bugzilla.samba.org/attachment.cgi?id=985action=view)
Add optional last-match parsing

Here's a simple patch that allows any filter/include/exclude file to be parsed
in a last-match-wins format.  The file must contain this line (on its own):

[last-match]

This causes all the following rules to be reversed as they are read in, making
them behave in a last-match manner.  This shouldn't cause a problem in an
include/exclude file because the above string would have been a bogus character
range that nobody should have specified.

-- 
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.
-- 
To unsubscribe or change options: https://lists.samba.org/mailman/listinfo/rsync
Before posting, read: http://www.catb.org/~esr/faqs/smart-questions.html


[Bug 2240] Add last-match/short-circuit processing of include/exclude

2005-01-15 Thread samba-bugs
https://bugzilla.samba.org/show_bug.cgi?id=2240





--- Additional Comments From [EMAIL PROTECTED]  2005-01-15 08:35 ---
On Thu, Jan 13, 2005, [EMAIL PROTECTED] wrote:


 I'm not totally sure what you mean by arbitrary nesting of matches, but 
 I'll
 assume that you're talking about being able to override the rules of a
 .cvsignore file (which is not currently possible) and to string together
 multiple generic --include-from/--exclude-from files on the command-line and
 have some of the files specify a rule that will override the rules of a later
 file (or earlier, depending on the order of the scan).


Yes. Just a typical example. You have the following tree:

  dir1/   (+)
  dir2/   (+)
dir21/(-)
dir22/(+)
  file221 (+)
  file222 (-)
  file223 (+)
dir23/(-)
  dir3/   (+)

Now consider that everything should be synchronized with dir2/* excluded
except for dir2/dir22 and that dir2/dir22/file222 also should be
not synchronized. With the current first match approach shuch a
synchronization cannot be done at all in a generic way. The only
possibility would be to perform multiple individual synchronizations,
but this becomes impossible if at some intermediate level an abitrary
number files or dirs exist. With the last match approach such a
synchronization is trivial:

 + *
 - dir2/*
 + dir2/dir22/
 - dir2/dir22/file222

That's especially also the reason why mostly all modern packet filters
or similar access control mechanisms use the last match approach
nowadays: it's a super-set of first match and with the short
circuiting add-on feature it is also as convenient as first match.


 [...]
 As for the order of the includes/excludes, the same logic can be implemented 
 in
 either order, so we need some other reason besides adding a new short-circuit
 syntax to change it. For instance, your patch can be thought of as 
 implementing
 first-match on the short-circuit rules, and falling back to last match on the
 rest of the rules (and .cvsignore files must get added at the bottom of the 
 list
 of rules). In the current rsync order this would be implemented as a priority
 last-match of the short-circuit rules, followed by first-match of the normal
 rules (and .cvsignore files continue to be added at the top of the list of
 rules). So, a --last-match option should only be added if we wish to give the
 user the option of writing their rules in the opposite order, and I'm not 
 sure
 we need that.

 As for the implementation, I'd prefer to see one that doesn't always match 
 every
 name against every item in the list (if we can help it). We can do this by
 adding a previous pointer to the exclude_struct so that it can be scanned 
 in
 either order. The code would then scan in one direction for just the
 short-circuit rules (if any exist), and then fall back to scanning in the
 opposite direction for normal rules. If the --last-match option was still
 desired, I would make its only affect be to change the order of how the 
 user's
 items get put into the list (so that the same scanning code could be used for
 both modes).


H... I'm not sure whether I understand what you have in mind here.
In general the short-circuit rules are not directly equal to the rules
in the first match approach. It is correct that a ruleset consisting
of short-circuit rules _only_ effectively degrades the last match
approach to a first match approach. But in mostly all practical
situations short-circuit and regular rules are _intermixed_ and the
position of rules in the last match approach is _not_ arbitrary
(neither with nor without short-circuit rules). Hence one cannot
perform an arbitrary way to match the rules!

I prefer to think about the rules in a last match approach as
sub-terms of a left-associative mathematical expression (evaluated from
left to right) on sets where the used operators are union (+) and
difference (-) [not intersection!]. Here the expression cannot be just
re-grouped to right-association without changing the resulting set. The
same for the rules in the include/exclude lists.

So, while in the first match approach all rules are more or less equal
and can be most of the time matched against in an arbitrary order,
in the last match approach the rules can be matched against in the
specified order _only_. This ordering semantics is what makes the last
match approach a lot more flexible and powerful. The short-circuit
add-on feature is just the usual convenience solution added to last
match approaches to make the rule list easier to read (because one do
not have to assemble all short-circuit rules at the end of the rule
list and instead can keep them together with other rules applying to
similar elements).

But perhaps I still not understand exactly how you think the two
approaches can be mixed together. IMHO they can't and that was the
reason why I used an explicit option --last-match to switch between the
approaches.


 I'm

[Bug 2240] Add last-match/short-circuit processing of include/exclude

2005-01-15 Thread samba-bugs
https://bugzilla.samba.org/show_bug.cgi?id=2240





--- Additional Comments From [EMAIL PROTECTED]  2005-01-15 14:47 ---
Ops, yes, you're right. Sorry, my fault in assuming the whole time
that we want to use the usual out to in way of describing the
include/exclude list. Certainly a wrong assumption from my side. Yes,
you're fully right: if we open our mind and also accept in to out
descriptions (although I find them less intuitive) the
first match approach is fully sufficient and as powerful, too.

Remains just the questions how many people find out to in and how
many in to out descriptions more natural. I'm a clear fan of out
to in thinking when it comes to rsync, because the whole rsync command
is a synchronize this tree command plus a few include/exclude options
covering the inside of the tree. And it's the way one is also used to
from mostly all modern ACL implementations I know of.

But that's just my point of view. I don't know what people prefer more.
Perhaps that's the reason why we shouldn't try to merge first match
and last match approaches in rsync, because one is more suitable for
in to out and the other for out to in descriptions. Hence both have
their right to exist IMHO. And by keeping first match as the default,
rsync also doesn't have any backward compatibility problems.


-- 
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.
-- 
To unsubscribe or change options: https://lists.samba.org/mailman/listinfo/rsync
Before posting, read: http://www.catb.org/~esr/faqs/smart-questions.html


[Bug 2240] Add last-match/short-circuit processing of include/exclude

2005-01-13 Thread samba-bugs
https://bugzilla.samba.org/show_bug.cgi?id=2240





--- Additional Comments From [EMAIL PROTECTED]  2005-01-13 07:48 ---
Created an attachment (id=887)
 -- (https://bugzilla.samba.org/attachment.cgi?id=887action=view)
rsync.patch.lastmatch


-- 
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.
-- 
To unsubscribe or change options: https://lists.samba.org/mailman/listinfo/rsync
Before posting, read: http://www.catb.org/~esr/faqs/smart-questions.html


[Bug 2240] New: Add last-match/short-circuit processing of include/exclude

2005-01-13 Thread samba-bugs
https://bugzilla.samba.org/show_bug.cgi?id=2240

   Summary: Add last-match/short-circuit processing of
include/exclude
   Product: rsync
   Version: 2.6.3
  Platform: All
   URL: http://cvs.openpkg.org/getfile/openpkg-
src/rsync/rsync.patch.lastmatch
OS/Version: FreeBSD
Status: NEW
  Severity: enhancement
  Priority: P3
 Component: core
AssignedTo: [EMAIL PROTECTED]
ReportedBy: [EMAIL PROTECTED]
 QAContact: [EMAIL PROTECTED]


I've added a --last-match command line option to RSYNC 2.6.3 which
switches the include/exclude pattern processing from first-match (the
default) to last-match semantics plus the possibility to specify
short-circuit patterns (which stop processing immediately if matching)
with the operators -! and +! in addition to the regular operators
- and +. The last-match is a super-set of the first-match
semantics, providing more flexible include/exclude specifications by
allowing arbitrary nesting of matches.

For patch see the OpenPKG repository:
http://cvs.openpkg.org/getfile/openpkg-src/rsync/rsync.patch.lastmatch

-- 
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.
-- 
To unsubscribe or change options: https://lists.samba.org/mailman/listinfo/rsync
Before posting, read: http://www.catb.org/~esr/faqs/smart-questions.html


[Bug 2240] Add last-match/short-circuit processing of include/exclude

2005-01-13 Thread samba-bugs
https://bugzilla.samba.org/show_bug.cgi?id=2240


[EMAIL PROTECTED] changed:

   What|Removed |Added

 Status|NEW |ASSIGNED




--- Additional Comments From [EMAIL PROTECTED]  2005-01-13 14:26 ---
I'm not totally sure what you mean by arbitrary nesting of matches, but I'll
assume that you're talking about being able to override the rules of a
.cvsignore file (which is not currently possible) and to string together
multiple generic --include-from/--exclude-from files on the command-line and
have some of the files specify a rule that will override the rules of a later
file (or earlier, depending on the order of the scan). This is something that
was talked about before, and I think that it would be a nice idea to add
something like this to rsync. Your syntax choice looks like a good one.  (I had
previously suggested using ++ pattern instead of +! pattern, but I like +!
better).

This does mean that an incompatibility in the syntax of exclude files is
introduced (e.g. a file named +! foo was not previously special). I'm thinking
that it would be a good idea to make the code escape all names that start with
+ or - (e.g. prefix +  or - , as appropriate). This would allow the
adding of any non-space suffixes to the initial + or - to change their
meaning without adding any new incompatibilities in the syntax of the
include/exclude files. I think I'll go ahead and add this to the code that sends
the name over the socket, as it does not interfere with backward compatibility
(and improves forward compatibility).

As for the order of the includes/excludes, the same logic can be implemented in
either order, so we need some other reason besides adding a new short-circuit
syntax to change it. For instance, your patch can be thought of as implementing
first-match on the short-circuit rules, and falling back to last match on the
rest of the rules (and .cvsignore files must get added at the bottom of the list
of rules). In the current rsync order this would be implemented as a priority
last-match of the short-circuit rules, followed by first-match of the normal
rules (and .cvsignore files continue to be added at the top of the list of
rules). So, a --last-match option should only be added if we wish to give the
user the option of writing their rules in the opposite order, and I'm not sure
we need that.

As for the implementation, I'd prefer to see one that doesn't always match every
name against every item in the list (if we can help it). We can do this by
adding a previous pointer to the exclude_struct so that it can be scanned in
either order. The code would then scan in one direction for just the
short-circuit rules (if any exist), and then fall back to scanning in the
opposite direction for normal rules. If the --last-match option was still
desired, I would make its only affect be to change the order of how the user's
items get put into the list (so that the same scanning code could be used for
both modes).

I'm currently considering some changes to the include/exclude code: namely a
modified version of the current merge-exclude-file.diff in the patches dir, but
with the syntax of the include-rule lines changed. Thus, the addition of a new
overriding include/exclude idiom would go well with this.

-- 
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.
-- 
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: Stuck with include/exclude options

2005-01-10 Thread Wayne Davison
On Fri, Jan 07, 2005 at 05:25:14PM +0100, David E. Meier wrote:
 The directory ~data/C/test2 does not get deleted on the remote side.

Which is a very good thing, because you didn't tell it to transfer
test2, and rsync does not go around deleting things outside the
transferred file tree.

Rsync only deletes inside directories that it sends, so you'll need to
send the whole .../C/ dir if you want rsync to delete subdirs inside it.
If you only want to transfer some of the dirs inside .../C/, you'll need
to use the --include/--exclude syntax to limit which directories on the
source side get transferred.  Like this:

$ rsync -avvr --temp-dir=temp --delete -e ssh --stats
  --include=/test1/ --include=/test3/ --exclude=/*
  /cygdrive/C/ [EMAIL PROTECTED]:data

You can put the include/exclude statements into a file, like this:

+ /test1/
+ /test2/
- /*

And then use --include-from=FILE instead of the separate
--include/--exclude options.

..wayne..
-- 
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: Stuck with include/exclude options

2005-01-10 Thread David E. Meier
Thanks a lot Wayne, that explains it.

I changed the --delete to --delete-excluded and appended a trailing C to
data. This way I get the desired behaviour.

However, this leads me to the conclusion I need to run rsync separatly for
any of the drives, right?

Dave

 On Fri, Jan 07, 2005 at 05:25:14PM +0100, David E. Meier wrote:
 The directory ~data/C/test2 does not get deleted on the remote side.

 Which is a very good thing, because you didn't tell it to transfer
 test2, and rsync does not go around deleting things outside the
 transferred file tree.

 Rsync only deletes inside directories that it sends, so you'll need to
 send the whole .../C/ dir if you want rsync to delete subdirs inside it.
 If you only want to transfer some of the dirs inside .../C/, you'll need
 to use the --include/--exclude syntax to limit which directories on the
 source side get transferred.  Like this:

 $ rsync -avvr --temp-dir=temp --delete -e ssh --stats
   --include=/test1/ --include=/test3/ --exclude=/*
   /cygdrive/C/ [EMAIL PROTECTED]:data

 You can put the include/exclude statements into a file, like this:

 + /test1/
 + /test2/
 - /*

 And then use --include-from=FILE instead of the separate
 --include/--exclude options.

 ..wayne..



-- 
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: Stuck with include/exclude options

2005-01-10 Thread Wayne Davison
On Mon, Jan 10, 2005 at 10:28:54PM +0100, David E. Meier wrote:
 However, this leads me to the conclusion I need to run rsync separatly for
 any of the drives, right?

It all depends on how the souce and destination directories match up.
If the destination has a dir named C and D (in the same parent dir)
it is easy to transfer C by name into the destination (rather than
the contents of C/ into the C dir on the destination) and combine
that with whatever other drive letters you need.

..wayne..
-- 
To unsubscribe or change options: https://lists.samba.org/mailman/listinfo/rsync
Before posting, read: http://www.catb.org/~esr/faqs/smart-questions.html


Stuck with include/exclude options

2005-01-07 Thread David E. Meier
Hello list,

I try to keep a list of directories/files on windows in sync with the ones
on a remote machine. Basically syncing works fine, however I am
stuck/confused with the various possiblities using include/exclude
options. Your help is very much appreciated. Here's the scenario:

Local source dir: /cygdrive (seems to be required or else the cygwin-HOME
is set)
Remote destination dir: ~/data

Local file tree to be synced, that may vary each time rsync is run:

C:\test1\a1\
 b1\
 c1\
C:\test2\a2\
 b2\

So I created a file files.txt containing:

C/test1
C/test2

And then I call rsync:

$ rsync -avvr --temp-dir=temp --delete -e ssh --stats
--files-from=files.inc /cygdrive [EMAIL PROTECTED]:data

This copies all the directories just fine to the remote machine. However,
when I run rsync wiht a different file tree to be synced, say:

C:\test1\a1\
 b1\
 c1\
C:\test3\a3\
 b3\

The directory ~data/C/test2 does not get deleted on the remote side. How
can I achieve this? How do I have to set the options so that any
directory/file on the remote side that is not explicitly listed as include
path gets deleted?

Thanks VERY much for any help on this! Dave.


-- 
To unsubscribe or change options: https://lists.samba.org/mailman/listinfo/rsync
Before posting, read: http://www.catb.org/~esr/faqs/smart-questions.html


  1   2   >