GeneWeb - Maintenance

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

<ul>

<li> <a href="#Clea">1.</a> Cleaning.

<li> <a href="#Rena">2.</a> Renaming.

<li> <a href="#Save">3.</a> Backup.

</ul>

<p>

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

<p>


<a name="Clea"></a>
== Cleaning  ==

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

<p><ul><li> If you did many updates, the access to the data gradually
becomes slower.</ul>

<p><ul><li> If you add new families or you modify persons,
consanguinity is not displayed any more or can be incorrect.</ul>

<p><ul><li> 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.</ul>

The base should then be cleaned.

<p><ul><li> 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#Int/start]]] with GeneWeb") and type:

<pre>
     consang foo
</pre>

<p>

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.

<p>

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).

</ul>

<p><ul><li> 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":

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

then:

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

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".

<p>

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.

<p>

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.

<p>

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

</ul>


<a name="Rena"></a>
== 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".

<p>

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

<p><ul><li> With windows of icons, to change "bar.gwb" into "foo.gwb":

<p>

<ul>

<li> Open an window of the directory holding your bases.

<li> Put "foo.gwb", if it exists, at the dustbin.

<li> Rename "bar.gwb" as "foo.gwb".

</ul>

</ul>

<p><ul><li> With a window of interactive commands:

<p>

<ul>

<li> Under Unix:

<pre>
     rm -rf foo.gwb
     mv bar.gwb foo.gwb
</pre>

<li> Under Windows:

<pre>
     del foo.gwb\*.*
     rmdir foo.gwb
     move bar.gwb foo.gwb
</pre>

</ul>

</ul>

</ul>


<a name="Save"></a>
== 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).

<p>

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

<p>

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).

<p>

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:

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

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.

<p>

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

<p><ul><li> It is simpler, since it is only a file, whereas the base
is a whole directory.</ul>

<p><ul><li> Its size is smaller.</ul>

<p><ul><li> One can reconstitute it with any other "gwc", even using a
future version of GeneWeb.</ul>

<p><ul><li> 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.</ul>

<p><ul><li> One can make a comparison between various backed up versions
and with the current version.</ul>

<p>

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

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

<p>

<p>

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

