Merging several bases

From GeneWeb
(Redirected from Merge)
Jump to: navigation, search
150px-Geographylogo svg.png Language: English • français

This section explains how to “merge multiple GeneWeb bases”.

Merging bases is performed in three steps: concatenation of bases, suppression of redendant “doubles”, cleanup.

If you are not specialists of terminal command lines, you may use gwsetup which will guide you if the bases are already installed in your environment.

Merging bases in gwsetup: choosing bases to merge.

Merging bases

If you have two bases toto et titi, create the corresponding GW format files with the gwu command:

gwu toto >
gwu titi >

Create a new union base, for instance tutu, with the gwc command: 

gwc -o tutu
Merging bases in gwsetup: confirmation.

It is possible that gwc will display error messages triggered by persons bearing the same lastname, firstname, occurrence combination in both bases.

To remove this errors, the gwc option -sep will offset automatically occurrence numbers thus avoiding conflicts:

gwc -sep -o tutu

Note: in order to give you more control over this process, there is an additional parameter forcing the offset to a specified value.

You now have a valid base named tutu containing the sum of the two previous bases, and you can proceed to update the content of this new base, in particular merging multiply defined persons as explained below. GeneWeb remembers which file a aprticular family comes from, and you will later be able to reconstruct those files as explained here.

In order to display which file a particular family comes from, add ;opt=from to the URL as in:


The .gwf parameter origin_file=on sets this feature permanently for a base.

Merging persons

After concatenation of several bases, with or without the -sep option, you may have multiply defined persons in your new base. In order to merge these double entries, you must follow the instructions of the section on merging two persons or families as much as needed.


After this person and families merging steps, the memory space used by these doubles is not automatically reclaims (you will notice that the total number of persons in the base remains constant). It is therefore useful to perform a cleanup of the new base:

gwu tutu >
gwc -o tutu

If you know you want to suppress the previous version of the new base, use option -f:

gwc -o toto -f

GeneWeb Manual

Rembrandt Old Man Reading a Book.jpg

Use and manage genealogical databases

Technical annex