GeneWeb - Merging databases

This part indicates the procedure to you to merge databases.

<p>

If you are not a specialist of interactive commands, use the program
[[[gwsetup/gwsetup]]] which tells you how to do
that (you can then ignore the rest of the present chapter).

<p>

The merging of databases is done in two steps:

<p><ul><li> First gathering the two bases into a new one.</ul>

<p><ul><li> Second, merging the persons.</ul>


==First step: concatenation of bases  ==

That can be done only in an interactive window (see "How to [[[start/start]]] with GeneWeb").

<p><ul><li> If you have a base called "foo" and another which is
called "bar", extract these two bases as source files with the command
"gwu". Type:

<pre>
     gwu foo &gt; foo.gw
     gwu bar &gt; bar.gw
</pre>

</ul>

<p><ul><li> Create a common base "base".  Type:

<pre>
     gwc foo.gw -sep bar.gw -o base
</pre>

The option "-sep" allows to treat "bar.gw" separately: if a person in
"bar.gw" is already defined with the same key (first name/surname/number)
in "foo.gw", the number of his key is automatically shifted to avoid the
conflict.

</ul>


==Second step: merge of persons  ==

You now have a database "base" holding "foo" and "bar" with some
persons recorded twice.

<p>

You will be able to merge these people in your navigator. If "gwd" is
not launched, launch it.

<p>

Then apply [[[update#MrgP/persons merging]]], which is in
the part "How to make modifications in the database" (forget the
comment about the fact that it is not about "databases merging").


==Final cleaning up  ==

At the end of merging, it is wise to make a final cleaning up of the
base. Indeed, when persons or families are removed (what occurs when
merging are done), the space of the removed persons and families is
not recovered. In particular, the welcome page always indicates the
same number of persons.

<p>

To do the cleaning up of the base "base" (you can make at any time,
and even several times), use again an interactive window. Type:

<pre>
     gwu base &gt; base.gw
     gwc base.gw -o base
</pre>

<p>

Note that if you want to scratch the old base "foo", type simply "-o
foo -f" in this second command:

<pre>
     gwc base.gw -o foo -f
</pre>

<p>

<br>
<center>Return to [[[diruse/Directions for Use]]]</center>

