[Replicator-users] Re: A look in "repli-update"
Status: Beta
Brought to you by:
schaumat
|
From: Bernd H. <bj...@da...> - 2002-10-30 18:02:19
|
On Tue, Oct 29, 2002 at 11:40:20PM +0100, Jerome Warnier wrote:
> Before anything else, tell me which version you are currently using.
I use a Debian-Package from the CVS-Version from 20.08.2002 with some
small bugfixes (see my bug reports) and some fixes to allow the package
build prozess.
Today I have build a new debian package with the upstream changes and
my fixes. CVS from 30.10.2002. I will test it tomorrow.
> >--------------------------------------------------------------------
> >2) Write a list of the Param "repli-update" understands and what they
> >should do.
> >--------------------------------------------------------------------
> >
> >repli-install calls:
> >repli-update --config $confile $ssh_opt --dev $rupdate_dry=20
> >$netcopy_exclude --model $model --destdir $installtarget
> >But I don't know, what is in the variables at that time.
> >
> >
> >repli-sync calls:
> >$share_dir_on_server/repli-update --destdir / --model $model --config=20
> >$confile @ARGV
> >$confile is "/etc/replicator/repli-sync" on the replicated host and
> >$model ist taken from that file.
> >
> >Why these calls behave different ?
Can you explain the contents of the params during the call from
repli-install.
> >--------------------------------------------------------------------
> >3) Take a deeper look in the code of "repli-update" and understand
> >what is doing what.
> >--------------------------------------------------------------------
> >$excludefile =3D "/tmp/excl.rsync.$$";
> >$fh =3D new FileHandle $excludefile,"w" or die "opening exclude file:$!\=
n";;
> >foreach (@slash_exclude) { print $fh "- $_\n"; }
> >$fh->close; =20
> >dosystem("rsync $rsyncopt --one-file-system --exclude-from=3D$excludefil=
e=20
> >${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"; } ?
Can you explain this ?
> >my $usr_exclude =3D '';
> >foreach (@usr_exclude) { $usr_exclude .=3D " --exclude '- $_' "; } =
=20
> >dosystem("rsync $rsyncopt $usr_exclude ${model}::replicator/usr/.=20
> >$destdir/usr/. 2>&1");
> >
> >Interesting in how many different way a list can be passed to rsync. Is
> >there a matter for the different ways? I have somewhere heard about a
> >maximum length of the command line. Do you know how long a command line
> >can be?
> >$dryrun or -d "$destdir/var/." or mkdir "$destdir/var",0755 or die "cann=
ot=20
> >make $destdir/var";;
> >dosystem("rsync $rsyncopt --include '+ */' --exclude '- *'=20
> >${model}::replicator/var/. $destdir/var/.");
> >foreach (@var_include) {
> >dosystem("rsync $rsyncopt ${model}::replicator/var/$_/ $destdir/var/$_=
=20
> >2>&1");
> >}
> >
> >For what is the "+" and the "-" sign in the [ei][xn]clude-rules? Is ist
> >perl-syntax or parsed by rsync?
Can you enlight this ?
> >--------------------------------------------------------------------
> >4) Correct "repli-update" and/or call it with other params
> >--------------------------------------------------------------------
> >- What do you think about a @change_hostname list with files in which
> > the name of the model should be replaced with the name of the target
> > host. This can be implemented in repli-update or the example
> > repli-postint.
> I don't understand.
After repli-install there are some files in which the name of the model
must be replaced with the name of the targed. eg:
/etc/hostname
/etc/hosts
/etc/logcheck/ignore.d/local (in my setup)
/etc/mailname
/etc/motd
/etc/ssmtp/ssmtp.conf
I think it is nice to have a list to put such files in to let
replicator do the replacing (e.g. using seed).
I want files like /etc/logcheck/ingore.d/local and
/etc/ssmtp/ssmtp.conf updated during repli-sync. So the names must
replaced often.
> >- The config files replicator.conf and update_rules are not copied to
> > the target during repli-install bacause of the default
> > @shlash_exclude list. If we need them for repli.sync we should remove
> > /etc/replicator from this list.
> I did notice this too.
Because /etc/replicator in the modell contains only the following files
I feel it is save to remove them from #slash_exclude
bilbo:/etc/replicator# ls -l
insgesamt 32
-rw-r--r-- 1 root root 6661 21. Sep 19:28 replicator.conf
-rw-r--r-- 1 root root 684 21. Sep 19:32 repli-postinst
-rw-r--r-- 1 root root 94 26. Aug 12:03 repli-sync.conf
-rw-r--r-- 1 root root 215 20. Aug 17:14 rsyncd.conf
-rw-r--r-- 1 root root 1780 26. Aug 11:17 update_rules
> >- More ideas ?
> Yes, a lot.
> Sadly, I don't have access today to the machine were my replicator has=20
> been modified. I cannot tell much more today, and probably this week.
I like to hear.
Regards,
Bernd
|