A: (gnats 3.1xx) (Please consider upgrading to gnats 4.0 or greater.)
Note that there must be a category named pending
. It is
used when no category is given in a report, and when a report names an
invalid category.
Also note that each database needs its own mail address for submissions (see also step 8 below), and that you must enter it in the file config.
Run the program gen-index
to create the index file
(see Regenerating the index (Keeping Track)).
Find the greatest report number and put it (or any larger number) into /usr/local/gnats/db2/gnats-adm/current.
Caution: E-mail updates to the PRs you moved to the new database may still arrive at the old database. You may want to contact everybody who knows about these PRs, asking them to use the mail address of the new database when sending a follow-up.
/usr/local/gnats/db2:GreatNewDB
Gnatsd reads it on startup (and as it is started by inetd, this means it becomes effective with the next connection to gnatsd). Gnatsweb (see Gnatsweb) learns the database list from gnatsd, so it will offer you the new database "GreatNewDB" when it is invoked next time.
If you do not know where gnats-db.conf lives, run:
strings /where/ever/gnatsd | grep gnats-db.conf
/usr/local/lib/gnats/queue-pr -d /usr/local/gnats/db2 -r
or, if you prefer the long options,
/usr/local/lib/gnats/queue-pr --directory=/usr/local/gnats/db2 --run
GreatNewDB-bugs: "|/usr/local/lib/gnats/queue-pr -d /usr/local/gnats/db2 -q" GreatNewDB-query: "|/usr/local/lib/gnats/mail-query -d /usr/local/gnats/db2"
If you do not want to allow querying the database by mail, omit the GreatNewDB-query alias.
You usually need the cooperation of a system administrator for this step (if you are not a system administrator yourself, of course).
Make sure that /usr/local/gnats/db2/gnats-adm/config gives the correct mail addresses for GNATS_ADDR (this must be different for each database) and for GNATS_ADMIN (this is probably the same for all databases).
GNATS_ADDR="GreatNewDB-bugs@bugs.example.com" GNATS_ADMIN="gnats-admin@bugs.example.com"
If your gnats sits behind a firewall and needs to exchange mails with the outside world, see also Outgoing mail bounces.
A: (gnats 4.x) With version 4, this has become much easier (see Adding another database (Keeping Track)):
GreatNewDB:Our great tools:/usr/local/gnats/db2
Then, as the gnats user, run mkdb GreatNewDB to create the database. Make sure that the directory (in our example, /usr/local/gnats/db2) can be created by the gnats user.
(Note that there must be a database named default
. It
is used as a fallback by some tools if no database is specified. You
need not use it actively, but you should have run mkdb default.)
Gnatsd reads the file databases on startup (and as it is started by inetd, this means it becomes effective with the next connection to gnatsd). Gnatsweb (see Gnatsweb) learns the database list from gnatsd, so it will offer you the new database "GreatNewDB" when it is invoked next time.
If you do not know where databases lives, run:
strings /where/ever/gnatsd | grep databases
mkcat
anymore in order to
create new category directories in your database—gnats 4
creates them automatically when they are missing. See The dbconfig
file (Keeping Track), for details.
/usr/local/libexec/gnats/queue-pr -d GreatNewDB -r
or, if you prefer the long options,
/usr/local/libexec/gnats/queue-pr --database=GreatNewDB --run
GreatNewDB-bugs: "|/usr/local/libexec/gnats/queue-pr -d GreatNewDB -q" GreatNewDB-query: "|/usr/local/libexec/gnats/mail-query -d GreatNewDB"
If you are updating from gnats 3.1xx, note that the -d option has changed its meaning: it does not give the directory of the database, but its name. (In case you prefer the long form of the option, it is now --database instead of --directory.)
If your gnats sits behind a firewall and needs to exchange mails with the outside world, see also Outgoing mail bounces.