Hi Fred,

On 01.02.01 (19:39), Fred Hirsch wrote:
> Well.. I am wanting to move content within an already
> converted 1.4 database. I converted from a previous 1.4beta
> shortly after 1.4 was released, but I had so many problems

So you've got a 1.4 db, upgraded from 1.4bx with the
database-upgrade script from one of the first (partially broken)
midgard-data packages (if your 1.4 upgrade happened till around
new year). Stuff to keep in mind when encountering bugs later
;-)

> Anyhow, my next big task is simply figuring out how to move
> content from SG0 to the new sitegroup. I know I am supposed to
> use repligard, and have actually gotten repligard to export
> the DB once, but to be honest, I don't remember how I did it.
> In any case, I have content which I want to move to two new
> sitegroups. One is for a hobby site which will hopefully have
> multiple users doing modifications, and the second is my
> consulting site, which I only want myself to edit. I am also
> considering creating a third "portal" oriented site.

Okay. So you want more than one new SG -- at least one for the
hobby site and one for your stuff. A brand new site would simply
go into a new SG but leaves not migration headaches to cope
with.

> How I get the content from one place to the next is my big
> confusion. It seems to me that the way I am supposed to do it
> is basically copy all of SG0 into the new sitegroup and then
> manually delete all the asgard stuff from the new group.

Basically, yes. There's a tool called xsg (by David) that uses
repligard to export a whole sitegroup into an xml.gz file. It's
in CVS, and David sent me a package by e-mail, so if you like
...

> I don't do any linking (as repligard calls it) on the records
> to my knowledge (I might have put things into these fields
> when I first started playing with Midgard, but I do not
> actually use the data in code). I do have some styles which
> have parent/child relationships. Not sure if that matters.

No problem; repligard handles all 'standard' links (the ones
used by Midgard itself, such as article.topic, article.up,
topic.up, topic.owner etc.) well -- you'd only have to take
special actions if you're using your own links, such as an
article.icon field pointing to another article for some reason
(I had that).

First, backup your database and create a new one to play with
until you've got the migration done. To create a new, clean
Midgard database, be sure to fetch the very latest
midgard-data-1.4.tar.bz2 file (there are three of them to my
knowledge, all named the same :-/), unpack it and populate the
new mysql db with the tables and data from empty.sql (table
structure), midgard-en.sql (old Adminsite),
update-snippet-admin.sql (old admin update for snippet mgmt) and
GUIDSforOLDSITE.sql (repligard Global Unique IDs for the old
Admin).

Then create a new blobdir (the code for that is in the dbinstall
script which is also part of midgard-data, just scan for 'blob')
and make sure that there is a 'midgard' user with the same
password able to access the new database (or otherwise, update
your repligard.conf accordingly). Don't forget to change the
name of the database in your repligard.conf, as it will most
likely not be 'midgard' in the midst of a migration.

Then it's time to import Asgard, which is the point where you'll
see whether your database is in a good state (AsgardSite.xml is
as well part of midgard-data):

  repligard -c /path/to/modified/repligard.conf -i AsgardSite.xml

If you're getting that far, next part comes tomorrow or Sunday
;-)

     phr
-- 
Linksystem Muenchen GmbH                          [EMAIL PROTECTED]
Schloerstrasse 10                           http://www.link-m.de
80634 Muenchen                              Tel. 089 / 890 518-0
We make the Net work.                       Fax 089 / 890 518-77

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

Reply via email to