[Replicator-users] Tests for repli-sync ?
Status: Beta
Brought to you by:
schaumat
From: Bernd H. <bj...@da...> - 2002-10-31 14:08:11
|
Hello all, On Wed, Oct 30, 2002 at 07:45:34PM +0100, Sebastien Chaumat wrote: It's nice to read from you. Hope that you had a good holiday. > > > >-------------------------------------------------------------------- > > > >3) Take a deeper look in the code of "repli-update" and understand > > > >what is doing what. > > > >-------------------------------------------------------------------- > > > > > >$excludefile = "/tmp/excl.rsync.$$"; > > > >$fh = new FileHandle $excludefile,"w" or die "opening exclude file:$!\n";; > > > >foreach (@slash_exclude) { print $fh "- $_\n"; } > > > >$fh->close; > > > >dosystem("rsync $rsyncopt --one-file-system --exclude-from=$excludefile > > > >${model}::replicator/ $destdir 2>&1"); > > > > > > > >The content of the list @slash_exclude is written to a file, line by > > > >line. But for what is the "-" in { print $fh "- $_\n"; } ? > sure: the "-" tell rsync to force exclusion of the file even if there is > a wildcard to include it. From the manpage of rsync (I have thought the - is perl syntax, before): o if the pattern starts with "+ " (a plus followed by a space) then it is always considered an include pattern, even if specified as part of an exclude option. The "+ " part is discarded before matching. o if the pattern starts with "- " (a minus followed by a space) then it is always considered an exclude pattern, even if specified as part of an include option. The "- " part is discarded before matching. As I understand in an exclude-option you never need a "-" and in an include-option you never need a "+". (But is does no harm) The exclude and include options are parsed from the first to the last param and in the e/i-lists from the first line to the last. The first patern match is valid, no matter if there is a "+" or "-" sign. > > > >-------------------------------------------------------------------- > > > >4) Correct "repli-update" and/or call it with other params > > > >-------------------------------------------------------------------- > I will correct repli-update : this is my first taskj after fixing the > woody package. Because Jerome already fixed the woody package, I feel it is good to wait for his patch and concentrate on repli-update in the meantime. I will run some deeper tests this afternoon, to find out what files are exclude during repli-sync and what files not. Do you think it is good to do a new repli-install before or is it sufficient only to install the new debian package (CVS from 30.10.2002) on model and target. I you like that I run a spezial test, watch a spezial behavior or include a spezial patch before, just write me. After repli-update is working I think it is good to: a) write some documentation (e.g. manpages, more clean installation instructions) b) implement some nice new features (e.g. the @change_hostname list). Attached you find my "cvs diff" from today. Regards, Bernd |