Hi, Finally that seems to be working ok. It is maintaining a separation between approved and unapproved articles and not transferring the data between staging and live without approval. Thanks to everyone who has helped so far :-)
I have another problem however. I really could do with resynchronising the staging and live servers using repligard with the -a option to ensure that the live server is up to date and that no previously unapproved articles exist. Here in lies the problem. The xml file that repligard generates if 156Mb in size (it has data from 16 local websites). The remove_unapproved script crashes before it manages to parse such a huge xml file. Normal use of the remove_unapproved script (without repligard -a) is fine. Any ideas on how this can be fixed? Cheers Mike. -----Original Message----- From: Sonic [mailto:[EMAIL PROTECTED] Sent: 19 April 2004 12:16 To: [EMAIL PROTECTED] Subject: Re: [midgard-user] Staging / Live Server Synchronisation Problem 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] --------------------------------------------------------------------- To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]
