Saving bases

From GeneWeb
Revision as of 16:36, 15 October 2015 by Henri83 (Talk | contribs)

Jump to: navigation, search
150px-Geographylogo svg.png Language: English • français

This article explains how to save a GeneWeb base using command line tools. The same operations are also accessible through the web based interface gwsetup.

Storage devices are not 100% failsafe, and one should maintain multiple archives on separate devices. It may also be prudent to maintain inetrmediate versions of a base, allowing fallback to an earlier version in case of severe modification problems. Lastly, the .gw save format is a clean and sure mechanism to exchange bases between GeneWeb users (GEDCOM is also available but not with 100% compatibility).

A simple mechanism to archive a base is to make a copy of the base.gwb folder. A better mechanism is to produce a textual file using the .gw format.

To create an archive for base toto, use the gwu command  and archive the resulting output:

gwu toto >

Or using option -o for gwu :

gwu toto -o

You may select any name of your choice, provided you keep the extension .gw. For safe archival, make multiple copies of the file, on multiple devices.

Using the ;gw file format has many avantages :

  • simpliciy : a single file when the base folder contains multiple files (note forum and update history are not preserved through a .gw file) ;
  • economy : a .gw source file is quite smaller that the corresponding folder ;
  • compatibiliy : the .gw format maintains compatibility with future versions of GeneWeb ;
  • accessibiliy : the .gw is a human readable format, and allows for global editing or difference detection
(using a command such as diff under Unix/Linux/OSX)

To restaure base toto from, use the gwc commande:

gwc -o toto