Hello,

Problem and STILL a problem: 
Exporting 1.4.1 database to 1.4.2 server with 1.4.2 cvs repligard.

As requested from Alexander, I have taken the following steps.
Reference:
http://marc.theaimsgroup.com/?l=midgard-user&m=101178275609654&w=2

Exporting steps:

1.  1.4.1 midgard database has been moved to a 1.4.2 server

2.  1.4.1 database has been renamed "export" with blob dir "blobs_export".

3.  Using phpMyAdmin 2.2.3 :
3a. Selected database "export"
3b. Added a new user "export" with access to localhost & passwd "export"
3c. Selected privileges, allowing user "export" to access "export" 
    database with Select, Insert, Update, Delete, Create, Drop privileges.
3d. Still in phpMyAdmin, under "Database mysql - table db running on 
    localhost" area, I inserted a new row : Host=localhost, Db=export, 
    User=export, Select_priv=Y, Insert_priv=Y, Update_priv=Y,
    Delete_priv=Y, 
    Create_priv=Y. The rest were set to N.
3e. Ran "Reload MySQL"

4.  Ran isamchk -o *.ISM on export database, no errors
    isamchk, because the database has *.ISM files

5.  Made a file called export_admin.conf
    export_admin.conf has the required info to connect to 
    the "export" database, as admin user.
    This includes the correct schema repligard_withsg.xml and
    Blob dir points to correct blobs_export dir
    <replicate all="yes"/> Commented out.

6. Ran repligard -d -d -m -r -c /somedir/export_admin.conf  
   No errors.

7. Made a file called export.conf
   export.conf has the required info to connect to the "export" database,
   as admin user for the sitegroup to extract.
   This includes the correct schema repligard_withsg.xml and
   Blob dir points to correct blobs_export dir
   <replicate all="yes"/> uncommented.

8.  Ran repligard -d -d -a -c /somedir/export.conf -e export.xml.gz

9.  This produced the file export.xml.gz with no errors.

10. gunzip'ed export.xml.gz and ran "grep sitegroup export.xml"
    Looked good. No empty sitegroup tags.
    <sitegroup>some_long_nummer</sitegroup>

11. Using mc (midnight commander), because I like it, I viewed the file.

12. I searched for "sitegroup id"
    I found this in the LAST 2% of the file. Line 301916 of 305118 lines.
    Above the <sitegroup id="some_long_nummer"> tag was the tag </member>
    It had a changed="date" in the sitegroup tag. Good.
    It had a <admingroup>some_long_nummer</admingroup>. Good.
    It had a <name><![CDATA[Sitegroup Name]]></name>. Good.
    Then I see that there is an ending <realm/> tag, but NO 
    starting <realm> tag, so I searched for it. The starting <realm> tag 
    was not to be found. NOT good.
    After the ending <realm/> was the ending </sitegroup> tag to 
    end the sitegroup info.

*********************************************************************************
Importing steps:

1.  Using a "live" working 1.4.2 midgard database, I copied it to a
    database called "import".
    I also copied the "live" blobs dir to a dir called blobs_import.

2.  Ran myisamchk -o *.MYI under the newly created import database. 
    No errors.
    myisamchk, because the database has *.MYI files

3.  Using phpMyAdmin 2.2.3 :
3a. Selected database "import"
3b. Added a new user "import" with access to localhost & passwd "import"
3c. Selected privileges, allowing user "import" to access "import"
    database with Select, Insert, Update, Delete, Create, Drop privileges.
3d. Still in phpMyAdmin, under "Database mysql - table db running on
    localhost" area, I inserted a new row : Host=localhost, Db=import,
    User=import, Select_priv=Y, Insert_priv=Y, Update_priv=Y, Delete_priv=Y,
    Create_priv=Y
    The rest were set to N.
3e. Ran "Reload MySQL"

4.  Made a file called import.conf
    import.conf has the required info to connect to the "import" database
    as admin.
    This includes the correct schema repligard_withsg.xml.
    Blob dir points to correct blobs_import dir
    <replicate all="yes"/> commented out
.
5.  Ran repligard -d -d -c /somedir/import.conf -i export.xml

*********************************************************************************
RESULTS - TEST #1: 

table host
Sets imported HOSTS to SG0. NOT Good.

table sitegroup
Created new a NEW sitegroup. Good.

Checking the rest of the tables and selecting the correct SG id 
under "table sitegroup", I found this:

table article     - 0  of 73 
table blobs       - 0  of 216
table element     - 0  of 96
table grp         - 5  of 6 
table member      - 0  of 34
table page        - 39 of 164
table pageelement - 0  of 32
table person      - 13 of 13 !
table snippet     - 0  of 23
table snippetdir  - 0  of 18
table style       - 5  of 13
table topic       - 21 of 38

As far as I can see, everything imported fine. No errors while using
repligard.
For example, articles/blobs... were imported, but to SG0 only.

RESULTS - TEST #2: 

After doing Importing Steps #1 and #2, again,
I corrected the error found in Exporting Steps #12.
I added the missing tag <realm><![CDATA[sitegroup_name]]> infront of the 
ending <realm/> tag.

Ran repligard -d -d -c /somedir/import.conf -i export.xml
REPLIGARD/READ-CRITICAL **: mismatched tag in line 301920
301920 is the ending </sitegroup> tag from Exporting Steps #12.

So I changed the <realm/> tag to </realm> and re-ran repligard import.
No error. Newly imported hosts still in SG0.

RESULTS - TEST #3: 

After doing Importing Steps #1 and #2, again,

Moved entire <sitegroup id=...> </sitegroup> content to top of xml file.
Just under <Database xmlns="http://www.midgard-project.org/repligard/1.4";>

Ran repligard -d -d -c /somedir/import.conf -i export.xml
No errors. Newly imported hosts still in SG0.

Conclusion:
I am running out of ideas on how to make this work.
A simple question, which I am unsure of is:
Is the system admin required to CREATE the sitegroup on the new computer
running midgard, BEFORE you import that SG ?

We just need to get a working solution so we can import our clients from
1.4.1 to a 1.4.2 system.

Other than the above problem, I'm happy with midgard.

Best Regards,

James Ullman
Polarmedia Net AS


---------------------------------------------------------------------
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]

Reply via email to