Ok. I think I finaly made it. Thank you to everyone whos been trying to
help.
Here's the howto, with some comments,
note: this for extracting from a old db to a new one. I do not know it all
the stepps are needed today.


# Repligard Export from old DB version 1.4 beta 5
0. Download latest repliguard.xml's from cvs.
1. Install midgard 1.4.1
2. cd /usr/local/mysql/var
3. killall mysqld
3a killall safe_mysqld
4. cp -R midgard midgard_clean
5. rm -rf midgard
6. cp -R OLD_Database midgard
7. chown -R mysql.mysql midgard
7a. Use OLD database blobdir !!
8. /usr/local/mysql/bin/safe_mysqld --user=mysql &

9.
mysql -u midgard -p midgard
alter table sitegroup add sitegroup int(11) not null default '0';
drop table repligard;
CREATE TABLE repligard (
id int(11) NOT NULL default '0',
changed timestamp(14) NOT NULL,
updated timestamp(14) NOT NULL,
realm varchar(32) NOT NULL default '',
guid varchar(32) NOT NULL default '',
action enum('create','update','delete') NOT NULL default 'create',
sitegroup int(11) NOT NULL default '0',
PRIMARY KEY (guid),
KEY realm(realm,id)
);
quit

in phpmyadm : add the correct id to the different records in the sitgroupe
table so it reflects the sitgroups correct id. I.e. in the sitegrouptable,
every sitegroup has its own sitegroup field, this field needs to be set to
the sg id, to be included in the repligard export. Else, no sg id.

10.
#cd midgard-data-1.4.1 source dir
#delete/comment out all delete statements in GUIDSforOLDSITE.sql
#mysql -u midgard -p midgard < GUIDSforOLDSITE.sql
< - repliguard -m does this anyway ;) - >
# BTW: I think this was THE major f*** up.

XX. Open /usr/local/midgard/etc/repligard.conf
blobdir="/var/www/blobs"
Make sure it matches the old DB's blob dir.
schema="/usr/local/midgard/share/midgard/repligard_withsg.xml"
DO BEFORE repligard -r -m !!!
11. /usr/local/midgard/etc/repligard.conf
As admin/password for OLD database run repligard -m -r
(did w/o r)
check nr. of pages.
12. Open /usr/local/midgard/etc/repligard.conf
blobdir="/var/www/blobs"
Make sure it matches the old DB's blob dir.
schema="/usr/local/midgard/share/midgard/repligard_withsg.xml"
<login
    username="admin*nu"
    password="midgard"
/>
Uncomment and change from no to yes:
    <replicate all="yes"/>
Save /usr/local/midgard/etc/repligard.conf

#13. Open /usr/local/midgard/share/midgard/repligard_withsg.xml
#Search and replace on repligard_withsg.xml
#Change all occurances of type="string" to type="text"

14. cd /tmp
repligard -d -d -a -c /usr/local/midgard/etc/repligard.conf -e
SGname.xml.gz

15. gunzip SGname.xml.gz
Insert below just under:
<Database xmlns="http://www.midgard-project.org/repligard/1.4";>

<sitegroup id="3be794c5738df0be738e6d5286f5be3b" changed="20010504222747">
<name><![CDATA[nu]]></name>
<realm><![CDATA[nu]]></realm>
<admingroup>4412c672f1cfe2d627a533413a80769d</admingroup>
</sitegroup>

Where:
sitegroup id / Equals <sitegroup>some_long_number</sitegroup> with quotes
    changed / Copy the changed field of any one of the entries with quotes
name / sitegroup name
realm / sitegroup name
admingroup / Equals grp id=some_long_number without quotes


######## IMPORT
1. cd /usr/local/mysql/var
2. killall mysqld
3. cp -R midgard midgard_old
4. rm -rf midgard
5. cp -R cp -R midgard_clean midgard
6. chown -R mysql.mysql midgard
7. Use CLEAN database blobdir !!
8. /usr/local/mysql/bin/safe_mysqld --user=mysql &
9. Look above at #15
10. Comment out <replicate all="yes"/>
11. User admin password
12. repligard -c /usr/local/midgard/etc/repligard.conf -i SGname.xml.gz
es

> -----Original Message-----
> From: Tarjei Huse [mailto:[EMAIL PROTECTED]]
> Sent: 4. mai 2001 21:11
> To: [EMAIL PROTECTED]
> Subject: RE: [midgard-user] Repliguard - the saga continues....
>
>
> Ok. You will not belive this.
>
> I did the following:
>
> ran repliguard -m once.
> did a (in phpMyAdmin) select where sitegroup =2 (my
> sitegroup) and realm =
> page
> returned 0 entries
> ran repligard again.
> did a (in phpMyAdmin) select where sitegroup =2 (my
> sitegroup) and realm =
> page
> returned 83 entries
>
> Only problem now is, I got 86 pages!
>
> So, I tried to do some extra tuning. I'm using sitegroups, so
> i suddenly
> changed that in repligard.conf.
>
> ... to no awail.
> Then I did a select with id=41. And, guess what: THE PAGE HAD
> DISAPPEARED!!!!
>
> Take that one and tell me what has happened.
>
> Tarjei
> :(
>
>
> ---------------------------------------------------------------------
> 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]

Reply via email to