Repligard now can operate with whole database dump and
export/import incremental changes to it (diffs).

It automatically produces compressed XML files in order
to save bandwith.

Repligard commands:
-h         Displays this help message
-c <file>  Specifies configuration file
-e <file>  Export resources into <file>
-i <file>  Import resources into <file>
-m         Create GUID information for all resources
-r         Refreshes GUID information for all resources
           -m and -r may be specified together
	   
Repligard options:
-a         Export all resources instead of diff

Format of configuration file is described in repligard.conf.
You can specify several configuration files, the options from
the latest ones will override earlier.

Repligard can transfer BLOBs but it expects some help from
Midgard Administrator (you):

1. BlobDir should be created with proper ownership and permissions:
(as root)
# cd /home/httpd
# mkdir blobs
# cd blobs
# mkdir -p `perl -e '$dirs = "0123456789ABCDEF"; @dirs = split(//, $dirs); foreach $l1 (@dirs) { foreach $l2 (@dirs) { print "$l1/$l2\n"; } }'`
# chmod -R ug+srwX,o+rwX *
# chown -R apache:apache *

where 'apache' is a user under which your Apache server is working.

2. You should never touch BlobDir by hands, it should be updated only
by Midgard application (using Midgard/PHP level API) or by Repligard.

3. BlobDir should be unique per Database. Different databases must use
different BlobDirs. But several SiteGroups from one Database will share
one BlobDir without any problem.

========================================================================
MANUALLY EDITING REPLIGARD FILES
========================================================================

Repligard's XML files improve it a bit. Below you'll find some simple
rules how to edit them in external editor:

0. Add IDENT tag after <?xml> tag as comment.

1. Do not change any GUID information in resource definitions/links.

2. Make repligard.xml schema file your handbook on Midgard's resources 
   structure. Each field introduced as <link> or <rlink> (relative link, 
   like record_extension or blobs) contains GUID of resource to which this
   link established.

3. All content in CDATA sections needs no escapes against XML, you can
   write 'as-is' there. But in other places usual rules of escaping
   &, <, > and so on, apply. In Schema file, fields which should be
   shielded with CDATA defined with 'text' type. All other types aren't
   shielded.

4. After editing and before commiting, update 'changed' field in resource
   to current time using following pattern: YYYYMMDDHHmmss (20010102121030
   for example). Repligard 1.4 uses notation of local time, not GMT so
   you warned about differences in time zones. Version 1.4.1 will operate
   in GMT automatically (this is implication of MySQL's timestamps, see
   'info mysql DATETIME'). You can generate the current time in repligard
	timestamp format with "date '+%Y%m%d%k%M%S'"
