Hi Enrique,

On 25.02.01 (16:43), Enrique Vega wrote:
> > First of all, read Repligard chapter in Midgard Manual. It
> > will give you a basic overview how replication process
> > touches Midgard Database.
> 
> Alexander, I've read the repligard chapter and you are correct
> in saying that it is a basic overview of the replication
> process. That's it! The documentation seems to assume that the
> user is an expert programmer.

Well, Enrique is right, I'd say. repligard documentation is one
of the parts where the docs need improvement most at the moment.

> *    The loginusernameand passwordattributes allow you to restrict
>      replication to a Sitegroup, or to a specific resource tree.

Are you sure about the resource tree? Alexander? I thought that
would be the job of the <replicate> section.

> *    The replicateelement enables further granularity in replication.
> 
> When I look at repligard.conf I see nothing which points to
> replicate element :-( 
(...)

I'll comment it a bit:

> <?xml version="1.0" encoding="ISO-8859-1" ?>

XML standard stuff, a bit like HTML's DOCTYPE declaration.

> <!DOCTYPE Repligard [

Here we're defining our XML document type (the syntax for this
file). The following are the elements and attributes you'll find
and use later on in repligard.conf. When you have a look at the
2nd block from here (the database stuff) and the use of the 
database element below, you'll see the structure of this
definition.

> <!ELEMENT Repligard (database?,login?,replicate?)>
> 
> <!ELEMENT database EMPTY>
> <!ATTLIST database schema CDATA #REQUIRED>
> <!ATTLIST database name CDATA #REQUIRED>
> <!ATTLIST database username CDATA #REQUIRED>
> <!ATTLIST database password CDATA #REQUIRED>
> <!ATTLIST database encoding CDATA #REQUIRED>
> <!ATTLIST database blobdir CDATA #REQUIRED>
> 
> <!ELEMENT login EMPTY>
> <!ATTLIST login username CDATA #REQUIRED>
> <!ATTLIST login password CDATA #REQUIRED>
> 
> <!ELEMENT replicate (resource*)>
> <!ATTLIST replicate all (yes|no) 'no'>
> 
> <!ELEMENT resource EMPTY>
> <!ATTLIST resource type CDATA #IMPLIED>
> <!ATTLIST resource id CDATA #IMPLIED>
> <!ATTLIST resource guid CDATA #IMPLIED>
> ]>

Here we start the actual XML application, the use of those
definitions for repligard's configuration:

> <Repligard xmlns="http://www.midgard-project.org/repligard/1.4">
>     <!-- Database description -->
>     <!-- Path to optionally compressed Repligard schema file -->

This is a comment, isn't it? (SCNR, sorry ;-))

>     <database
>         schema="/usr/share/midgard-lib/repligard.xml"

The Path to optionally compressed Repligard schema file, as
stated above. This file defines repligard's view of the Midgard
database, re-creating all tables and fields with their data
types and relationships as an XML schema definition. This
defines repligard's common format to store Midgard data in XML,
including stuff like BLOBs that are not part of the Midgard
database itself.

>         name="midgard"
>         username="midgard"
>         password="midgard"

The midgard database's name, username and password for mysql
access to the database.

>         encoding="ISO-8859-1"

Character set used in the database, for the right encoding of
special characters.

>         blobdir="/var/www/blobs"

Your blob directory, as created via the midgard installation.

>     />

End of database stuff.

>     <!-- Login account description for Repligard operation -->
>     <login 
>         username="admin"
>         password="password"
>     />

Well, that's the username and password for the "login" to
midgard itself -- the same as you would use to access the needed
resources via the admin site, including (possibly) a login
delimiter (*/+/etc.) and sitegroup name. The above is well for a
fresh midgard installation; to export another sitegroup only,
you would need something like

  <login username="sitegroupadmin+sitegroup" password="..."/>

>     <!-- Description of the exportable resources -->
>     <!--
>     <replicate all="yes"/>
>     -->

This is the resource description (what resources to export),
commented out at the moment. The doctype definition at the top
of repligard.conf could tell you how to fill this section,
although the exact behaviour of some attributes is still unclear
to me. That's what I know (I think ;-)): replicate all="no" is
the default; setting all to yes is the same as specifing the
command line argument -a to repligard.

To define a number of resources to replicate, you can fill the
replicate element with one or more resource elements:

  <replicate all="yes">
     <resource guid="..."/>
     <resource type="snippet" id="123"/>
  </replicate>

You can describe a resource either by its Global Unique ID (that
you can find in your midgard database's repligard table) or by
its "type" (normally the same as its table name in the midgard
database, but I'm not sure whether this is a rule -- the exact
type definitions can be found in the XML schema definition file
mentioned above) and its id (from the database or the admin
interface).

> </Repligard>

EOF.

     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