GeneWeb - Maintenance

| # GeneWeb - Maintenance

This part indicates some important "tricks" for the maintenance of your databases.

- 1. Cleaning.
- 2. Renaming.
- 3. Backup.

If you use gwsetup, you can do these operation with it. The below method is about the approach by interactive commands.

### 1. Cleaning

When you modify your database with your navigator, some small problems can emerge:

- If you did many updates, the access to the data gradually becomes slower.

- If you add new families or you modify persons, consanguinity is not displayed any more or can be incorrect.

- If you remove persons and families, the occupied space is not recovered: thus, when you remove a person, the welcome page always displays the same number of persons.

The base should then be cleaned.

- The first cleaning can be made with the command "consang" which recomputes consanguinity for all the base and allows to recover the initial access speed. If you base is called "foo", take an interactive window (see the part "How to start with GeneWeb") and type:

           consang foo

  This command can take some seconds or minutes, according to the size of the base. A counter is displayed... Notice that during this operation, the on line updated are rejected: if you make "Ok" in a form, a message invites you to try again later.

  Under Unix, you can stop this command at any time, by typing "control-C" in the interactive window. The calculation of consanguinities will not be completed but the base will be cleaned. You will be able to start "consang" again later, it will resume calculation where it stopped it (except if you made modifications of families, in which case it will start again from the beginning).

- A better way to clean bases consists on using "gwu" and "gwc". This cleaning creates a very new base where the space of removed persons and families are recovered. In an interactive window, type, for the base "foo":

           gwu foo > foo.gw

  then:

           gwc foo.gw -o bar

  It is recommended not to create a base with the same name, because if "gwu" or "gwc" worked badly, you risks to loose everything. Here, we called it "bar".

  Check that "bar" is correct, and if it is it, remove the base "foo" (by removing the directory "foo.gwb"), then rename "bar" as "foo" (by renaming "bar.gwb" as "foo.gwb "). See how to do that, in the following section.

  After the call to "gwc", files are remaining with the extension ".gwo". You can remove them. Remove also the files ".gw", except if you want to keep them as backups.

  If you want consanguinity to work, it is necessary also to use "consang" again on this new database.

### 2. Renaming

The databases GeneWeb are directories with the extension ".gwb". If you simply change the name of the directory "bar.gwb" into "foo.gwb", your base which was named "bar" is named "foo".

To do this, you have the choice between windows of icons, if your system has one of them, or interactive commands.

- With windows of icons, to change "bar.gwb" into "foo.gwb":

  - Open an window of the directory holding your bases.
  - Put "foo.gwb", if it exists, at the dustbin.
  - Rename "bar.gwb" as "foo.gwb".

- With a window of interactive commands:

  - Under Unix:

             rm -rf foo.gwb
             mv bar.gwb foo.gwb

  - Under Windows:

             del foo.gwb\*.*
             rmdir foo.gwb
             move bar.gwb foo.gwb

### 3. Back up

The computers are not absolute reliable machines. It is important to back up your data from time to time, by copying them on another support (diskettes for example).

It can also be interesting to keep intermediate versions to return to old versions.

To back up the base "foo", simply make a copy of the directory "foo.gwb" on the other support (or elsewhere on the disc if you wish simply to keep it as intermediate version).

But there is a more clever way to backup: save rather your base as source files. For the base "foo", type, in a window of interactive commands:

         gwu foo > foo.gw

And copy the file "foo.gw" on the other support or elsewhere on the disc. You can also give him another name (but always with the extension ".gw") for your filing.

The backup as ".gw" files has several advantages:

- It is simpler, since it is only a file, whereas the base is a whole directory.

- Its size is smaller.

- One can reconstitute it with any other "gwc", even using a future version of GeneWeb.

- Being a text, it is readable under an editor (Word, Emacs, etc.); that could be useful. A software of genealogy in 3 centuries will be able to reconstitute your base.

- One can make a comparison between various backed up versions and with the current version.

To restore the base "foo" starting from the file "foo.gw", type:

         gwc foo.gw -o foo

Return to Directions for Use

Copyright (c) 1998-2005 INRIA - GeneWeb