Re: wildcards and nested files

2013-07-03 Thread Grant
>>> Anyways, the other way to do what you are asking is: rsync -azvi
>>> --exclude-from=excludes.txt --delete --delete-excluded /
>>> user@hostname:
>>>
>>> excludes.txt: + / + /etc + /etc/** + /home + /home/*/ +
>>> /home/*/.maildir/ + /home/*/.maildir/** - - *
>>
>> So the includes are in excludes.txt prefixed with "+ " and the
>> excludes are prefixed with "- - "?
>
> I am not sure where the second - came from.  That line should have
> been "- *" as in exclude everything that I didn't explicitly include
> previously (order matters).  I find it much easier to list both in a
> single file rather than using two since order is so important.
> Especially if you have multiple sets of includes and excludes.

I couldn't agree more.  May I suggest that the man page make reference
to this feature under --include-from and --exclude-from ?

> I also added a -i (--itemize-changes) because I am trying to generate
> a habit of always pairing it with -v since -v isn't all that useful
> without it.

Nice, I'm loving -i now.  Thank you for your help!

- Grant
-- 
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: wildcards and nested files

2013-07-03 Thread Grant
>>> rsync -azvi --exclude-from=excludes.txt --delete --delete-excluded /
>>> user@hostname:
>
>>> excludes.txt:
>>> + /
>>> + /etc
>>> + /etc/**
>>> + /home
>>> + /home/*/
>>> + /home/*/.maildir/
>>> + /home/*/.maildir/**
>>> - - *
>
>>So the includes are in excludes.txt prefixed with "+ " and the excludes
>>are prefixed with "- - "?
>
> Since excludes.txt is an --exclude-from file, the - is optional.
> Similarly, if you are using an --include-from file, the + is optional.
> These are both specializations of the generic --filter='merge filters.txt'
> filter option.  See the rsync man page for the gory details.

That's a great feature and I think it should be referenced in some way
under --include-from and --exclude-from in man rsync.

- Grant
-- 
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: wildcards and nested files

2013-07-03 Thread Francis . Montagnac

Hi

On Wed, 03 Jul 2013 11:00:38 +0200 Grant wrote:
>> These are both specializations of the generic --filter='merge filters.txt'
>> filter option.  See the rsync man page for the gory details.

> That's a great feature and I think it should be referenced in some way
> under --include-from and --exclude-from in man rsync.

This is almost already the case: just above in the --include /
--exclude options details.

Ex:

   --include=PATTERN
  This  option  is  a  simplified form of the --filter option that
  defaults to  an  include  rule  and  does  not  allow  the  full
  rule-parsing syntax of normal filter rules.

  See  the  FILTER  RULES section for detailed information on this
  option.

   --include-from=FILE
  This option is related to the --include option, but it specifies
  a  FILE  that  contains  include patterns (one per line).  Blank
  lines in the file  and  lines  starting  with  ';'  or  '#'  are
  ignored.   If  FILE  is  -,  the list will be read from standard
  input.


Francis
-- 
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: wildcards and nested files

2013-07-03 Thread Grant
>>> These are both specializations of the generic --filter='merge filters.txt'
>>> filter option.  See the rsync man page for the gory details.
>
>> That's a great feature and I think it should be referenced in some way
>> under --include-from and --exclude-from in man rsync.
>
> This is almost already the case: just above in the --include /
> --exclude options details.
>
> Ex:
>
>--include=PATTERN
>   This  option  is  a  simplified form of the --filter option that
>   defaults to  an  include  rule  and  does  not  allow  the  full
>   rule-parsing syntax of normal filter rules.
>
>   See  the  FILTER  RULES section for detailed information on this
>   option.
>
>--include-from=FILE
>   This option is related to the --include option, but it specifies
>   a  FILE  that  contains  include patterns (one per line).  Blank
>   lines in the file  and  lines  starting  with  ';'  or  '#'  are
>   ignored.   If  FILE  is  -,  the list will be read from standard
>   input.

I suppose a man page is a pretty cut-and-dried affair.  I guess this
is one for the bloggers.

- Grant
-- 
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: wildcards and nested files

2013-07-03 Thread Grant
>>> Anyways, the other way to do what you are asking is: rsync -azvi
>>> --exclude-from=excludes.txt --delete --delete-excluded /
>>> user@hostname:
>>>
>>> excludes.txt: + / + /etc + /etc/** + /home + /home/*/ +
>>> /home/*/.maildir/ + /home/*/.maildir/** - - *
>>
>> So the includes are in excludes.txt prefixed with "+ " and the
>> excludes are prefixed with "- - "?
>
> I am not sure where the second - came from.  That line should have
> been "- *" as in exclude everything that I didn't explicitly include
> previously (order matters).  I find it much easier to list both in a
> single file rather than using two since order is so important.

Is there a rule I can apply to figure out the proper order for
includes and excludes?  I found that:

- /folder1/folder2

needs to be above:

+ /folder1/**

but  "- *" needs to be at the very end which is confusing.

- Grant
-- 
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: wildcards and nested files

2013-07-03 Thread Steven Levine
In ,
on 07/03/13
   at 02:55 AM, Grant  said:

Hi Grant,

>Is there a rule I can apply to figure out the proper order for includes
>and excludes?

Rules are evaluated in the order they are defined.  The first rule with a
pattern that that matches is the rule that applies.

If you are a C programmer, think of it as the standard shortcut logical or
(i.e. ||).  Evaluation stops at the pattern that evaluates to true.

If you really want to use rsync effectively, it will be worthwhile to
fully understand the "FILTER RULES" and "INCLUDE/EXCLUDE PATTERN RULES"
sections of the man page.

The answers to your questions are there, but there's enough content that
it can take a could of reads to get a feel for the developers way of
thinking.

Steven

-- 
--
"Steven Levine"   eCS/Warp/DIY etc.
www.scoug.com www.ecomstation.com
--

-- 
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: wildcards and nested files

2013-07-03 Thread Steven Levine
In ,
on 07/03/13
   at 01:49 AM, Grant  said:

Hi Grant,

>I couldn't agree more.  May I suggest that the man page make reference to
>this feature under --include-from and --exclude-from ?

It does, but you have to read the man page from top to bottom.  As with
all man pages, there's a trade off between repetition and useful
cross-references.

The man page states

--exclude=PATTERN
This option is a simplified form  of  the  --filter option  that  defaults 
to an exclude rule and does not allow the full rule-parsing  syntax  of 
normal filter rules ...

and

--exclude-from=FILE
This option is related to the --exclude option, but itspecifies a FILE
that contains exclude patterns ...

The include options are documented similarly.

>> I also added a -i (--itemize-changes) because I am trying to generate
>> a habit of always pairing it with -v since -v isn't all that useful

FWIW, I always use -i and only use -v when debugging.

Steven

-- 
--
"Steven Levine"   eCS/Warp/DIY etc.
www.scoug.com www.ecomstation.com
--

-- 
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: wildcards and nested files

2013-07-03 Thread Kevin Korb
-BEGIN PGP SIGNED MESSAGE-
Hash: SHA1

The way I think of it is that by default everything is included.
Excludes override that and remove certain paaterns.  Includes override
that and put back in certain patterns.

On 07/03/13 05:55, Grant wrote:
 Anyways, the other way to do what you are asking is: rsync
 -azvi --exclude-from=excludes.txt --delete --delete-excluded
 / user@hostname:
 
 excludes.txt: + / + /etc + /etc/** + /home + /home/*/ + 
 /home/*/.maildir/ + /home/*/.maildir/** - - *
>>> 
>>> So the includes are in excludes.txt prefixed with "+ " and the 
>>> excludes are prefixed with "- - "?
>> 
>> I am not sure where the second - came from.  That line should
>> have been "- *" as in exclude everything that I didn't explicitly
>> include previously (order matters).  I find it much easier to
>> list both in a single file rather than using two since order is
>> so important.
> 
> Is there a rule I can apply to figure out the proper order for 
> includes and excludes?  I found that:
> 
> - /folder1/folder2
> 
> needs to be above:
> 
> + /folder1/**
> 
> but  "- *" needs to be at the very end which is confusing.
> 
> - Grant
> 

- -- 
~*-,._.,-*~'`^`'~*-,._.,-*~'`^`'~*-,._.,-*~'`^`'~*-,._.,-*~'`^`'~*-,._.,-*~
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.20 (GNU/Linux)
Comment: Using GnuPG with Thunderbird - http://www.enigmail.net/

iEYEARECAAYFAlHUYc8ACgkQVKC1jlbQAQdtlwCdFwsHu1/ylUgt0y7yHYT7E2DB
B+sAnRSA3fTCy5ATpSJm9spVe9d9sxds
=dttX
-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


[Bug 9995] New: Rsync 3.1 dev :

2013-07-03 Thread samba-bugs
https://bugzilla.samba.org/show_bug.cgi?id=9995

   Summary: Rsync 3.1 dev :
   Product: rsync
   Version: 3.1.0
  Platform: x64
OS/Version: Linux
Status: NEW
  Severity: normal
  Priority: P5
 Component: core
AssignedTo: way...@samba.org
ReportedBy: dochitoai...@ladhyx.polytechnique.fr
 QAContact: rsync...@samba.org


Hi,

Sorry, I am french ,  my english is not very fluent.
Just a word, i wish to thank Wayne Davison for his work.
I 'm testing Rsync 3.1, with the db.diff Patch, especially the checksum
feature.
The build has no troubles. 
But, to initialize the tables in the Mysql Database, i have found an error :

dvu@alix:~/LADHYX/Dev/Rsync/Git/rsync> /opt/Rsync/bin/rsyncdb
--db=/opt/Rsync/dbconfig --init --mounts
Creating DB rsync (if it does not exist)
Dropping old tables (if they exist))
Creating empty tables ...
[rsyncdb] Prepare failed: Table 'rsync.disk' doesn't exist
INSERT INTO disk SET host = ?, last_seen = ?, mount_uniq = ?, devno = ? ON
DUPLICATE KEY UPDATE last_seen = VALUES(last_seen), devno = VALUES(devno)
Marking mount "Mount of /dev/sda4" (2052) as recently seen
Erreur de segmentation

The Mysql query in db.c file do not work.

CREATE TABLE disk (
disk_id integer unsigned NOT NULL PRIMARY KEY
AUTO_INCREMENT,
host varchar(256) NOT NULL default 'localhost',
mount_uniq varchar(256) default NULL,
devno bigint unsigned NOT NULL,
last_seen bigint NOT NULL,
UNIQUE KEY mount_lookup (host, mount_uniq),
KEY dev_lookup (devno, host)
)

I have tested it inside Mysql :

MariaDB [rsync]> CREATE TABLE disk (disk_id integer unsigned NOT NULL PRIMARY
KEY AUTO_INCREMENT,
-> host varchar(256) NOT NULL default 'localhost',
-> mount_uniq varchar(256) default NULL,
-> devno bigint unsigned NOT NULL,
-> last_seen bigint NOT NULL,
-> UNIQUE KEY mount_lookup (host, mount_uniq),
-> KEY dev_lookup (devno, host)
-> );
ERROR 1071 (42000): Specified key was too long; max key length is 767 bytes

I dont know if it's a Mysql's 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.
-- 
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