Hi!
Using YAMP instead of the old scripts is relatively easy. For me, the
following steps were necessary:
1: Download remove_unapproved.pl and delete_expired.pl (I stored them in
/var/lib/aegir/bin)
2: Edit repligard_stanging_to_live.sh to look like this:
~~~~~~~~~~~~~~~~~~~~~~~~~
#!/bin/bash
#script to transfer data from staging database to live database.
REPLIGARD=/usr/local/bin/repligard
if [ -e /usr/bin/repligard ] ; then
REPLIGARD=/usr/bin/repligard
fi
#0. fudge the page updates based on approval status
PERL=`which perl`
#1. dump the changes to a file
THISDATE=`/bin/date +%Y%m%d%H%M`
$REPLIGARD -c /var/lib/aegir/etc/repligard_hourly_dump_staging.conf \
-e /tmp/hourly_export_${THISDATE}.xml.gz
gunzip /tmp/hourly_export_${THISDATE}.xml.gz
${PERL} /var/lib/aegir/bin/remove_unapproved.pl
/tmp/hourly_export_${THISDATE}.xml
${PERL} /var/lib/aegir/bin/delete_expired.pl
/var/lib/aegir/etc/repligard_hourly_dump_staging.conf
/tmp/hourly_export_${THISDATE}.xml
#2. import the data into the live server
iconv -f UTF-8 -t ISO_8859-1 /tmp/hourly_export_${THISDATE}.xml -o
/tmp/hourly_export_${THISDATE}_conv.xml $REPLIGARD -c
/var/lib/aegir/etc/repligard_hourly_import_live.conf -i
/tmp/hourly_export_${THISDATE}_conv.xml
#3. delete the file!
#rm /tmp/hourly_export_${THISDATE}.xml
~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
The problem (for me at least) is that it didn't help. Unapproved content still
gets published (I get a Perl error from remove_unapproved.pl), but maybe you
have better luck than I :-)
Bye,
Andreas
Am Montag, 19. April 2004 11:34 schrieb Michael Ross (PCT North West):
> Hi,
>
> I have been looking deeper into the problem of data being transferred from
> the staging server to the live server without approval. I added the -w
> flag to the downgrade_unapproved.pl script and a whole host of warnings
> came up (most easily fixed with minor syntax changes). The one that
> concerned me was a repeating warning of:
>
> Use of uninitialized value at /var/lib/aegir/bin/downgrade_unapproved.pl
> line 140.
>
> This corresponds to the following bit of code:
>
> #BUILD THE IN BIT FOR
> #update repligard set updated=NULL where id in (1,2,3,4);
> # this will make the updated > than changed and hence ignore it.
> #
> #ALSO BUILD
> #update repligard set updated=0 where id in (5,6,7) for the force bit.
>
> $re_disable_in_string = "";
> while (($pageid) = $sth->fetchrow_array()) {
> if (($re_status{"page:".$pageid} eq "NOT") ||
> (!$re_status{"page:".$pageid})) { # This is line 140
> $re_disable_in_string .= ",".$pageid;
> }
> }
>
> An entry in the $re_status hash corresponding to a number of $pageid
> entries appear not to have been defined.
>
> Can anyone comment on this or is this nothing to worry about?
>
> I have considered using YAMP, but it appears many of the same problems
> still exist and to be honest I really dont want to make changes on a live
> server without concrete instructions to follow.
>
> Cheers
>
> Mike.
> ------------------------------------------
> Michael Ross
> Pan Leeds Web Developer
>
> Mill House Tel: 0113 3057335
> Troy Road Fax: 0113 3057167
> Horsforth, Leeds
> LS18 5TN
>
> ---------------------------------------------------------------------
> To unsubscribe, e-mail: [EMAIL PROTECTED]
> For additional commands, e-mail: [EMAIL PROTECTED]
---------------------------------------------------------------------
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]