move usdb init as per k1xx's bug
[spider.git] / html / adminmanual-5.html
1 <!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 3.2 Final//EN">
2 <HTML>
3 <HEAD>
4  <META NAME="GENERATOR" CONTENT="LinuxDoc-Tools 0.9.16">
5  <TITLE>The DXSpider Administration Manual v1.50: Databases</TITLE>
6  <LINK HREF="adminmanual-6.html" REL=next>
7  <LINK HREF="adminmanual-4.html" REL=previous>
8  <LINK HREF="adminmanual.html#toc5" REL=contents>
9 <link rel=stylesheet href="style.css" type="text/css" title="default stylesheet">
10 </HEAD>
11 <BODY>
12 <A HREF="adminmanual-6.html">Next</A>
13 <A HREF="adminmanual-4.html">Previous</A>
14 <A HREF="adminmanual.html#toc5">Contents</A>
15 <HR>
16 <H2><A NAME="s5">5.</A> <A HREF="adminmanual.html#toc5">Databases</A></H2>
17
18 <P>Spider allows the creation of local or remote databases.  It supports
19 chained databases, allowing several different databases to be scanned
20 with one simple command.  Importing of databases is limited at present
21 to the standard AK1A databases such as OBLAST and the DB0SDX QSL 
22 database but will expand with time.</P>
23
24 <H2><A NAME="ss5.1">5.1</A> <A HREF="adminmanual.html#toc5.1">Creating databases</A>
25 </H2>
26
27 <P>Creating a database could not be more simple.  All the commands are
28 sent from the cluster prompt as the <EM>sysop</EM> user.</P>
29 <P>To create a database you use the command <EM>dbcreate</EM>.  It can
30 be used in 3 different ways like so ..</P>
31 <P>
32 <BLOCKQUOTE><CODE>
33 <PRE>
34 dbcreate &lt;name>
35 </PRE>
36 </CODE></BLOCKQUOTE>
37 </P>
38 <P>To simply create a database locally, you just tell the command the
39 name of the database.  This does not create the actual database, it
40 simply defines it to say that it exists.</P>
41 <P>
42 <BLOCKQUOTE><CODE>
43 <PRE>
44 dbcreate &lt;name> chain &lt;name> [&lt;name>...]
45 </PRE>
46 </CODE></BLOCKQUOTE>
47 </P>
48 <P>This creates a chained database entry.  The first database will be
49 scanned, then the second, the third etc...</P>
50 <P>
51 <BLOCKQUOTE><CODE>
52 <PRE>
53 dbcreate &lt;name> remote &lt;name>
54 </PRE>
55 </CODE></BLOCKQUOTE>
56 </P>
57 <P>This creates a remote entry.  the first name field is the database
58 name at the remote node, then the remote switch, then the actual
59 node_call of the remote node, for example...</P>
60 <P>
61 <BLOCKQUOTE><CODE>
62 <PRE>
63 dbcreate buckmaster remote gb7dxc
64 </PRE>
65 </CODE></BLOCKQUOTE>
66 </P>
67 <P>Remote databases cannot be chained, however, the last database in a
68 chain can be a remote database.</P>
69
70 <H2><A NAME="ss5.2">5.2</A> <A HREF="adminmanual.html#toc5.2">Importing databases</A>
71 </H2>
72
73 <P>The only databases that Spider can currently import are the standard
74 AK1A databases such as OBLAST or the DB0SDX qsl and address database.
75 This will be added to with time.</P>
76 <P>To import such a database, first put the file somewhere useful like /tmp
77 and then issue the following command ...</P>
78 <P>
79 <BLOCKQUOTE><CODE>
80 <PRE>
81 dbimport oblast /tmp/OBLAST.FUL
82 </PRE>
83 </CODE></BLOCKQUOTE>
84 </P>
85 <P>This will update the existing local oblast database or create it if
86 it does not exist.</P>
87
88 <H2><A NAME="ss5.3">5.3</A> <A HREF="adminmanual.html#toc5.3">Checking available databases</A>
89 </H2>
90
91 <P>Once a database is created, you will want to check that it has been
92 added.  To do this use the <EM>dbavail</EM> command.  This will
93 output the available databases.  For example ...</P>
94 <P>
95 <BLOCKQUOTE><CODE>
96 <PRE>
97 dbavail
98 DB Name          Location   Chain
99 qsl              Local
100 buck             GB7ADX
101 hftest           GB7DXM
102 G0VGS de GB7MBC  3-Feb-2001 1925Z >
103 </PRE>
104 </CODE></BLOCKQUOTE>
105 </P>
106
107 <H2><A NAME="ss5.4">5.4</A> <A HREF="adminmanual.html#toc5.4">Looking up databases</A>
108 </H2>
109
110 <P>To look for information in a defined database, simply use the <EM>dbshow</EM>
111 command, for example ...</P>
112 <P>
113 <BLOCKQUOTE><CODE>
114 <PRE>
115 dbshow buckmaster G0YLM
116 </PRE>
117 </CODE></BLOCKQUOTE>
118 </P>
119 <P>will show the information for the callsign G0YLM from the buckmaster
120 database if it exists.  To make things more standard for the users
121 you can add an entry in the Aliases file so that it looks like a standard 
122 <EM>show</EM> command like this ...</P>
123 <P>
124 <BLOCKQUOTE><CODE>
125 <PRE>
126 '^sh\w*/buc', 'dbshow buckmaster', 'dbshow',
127 </PRE>
128 </CODE></BLOCKQUOTE>
129 </P>
130 <P>Now you can simply use show/buckmaster or an abreviation.</P>
131
132 <H2><A NAME="ss5.5">5.5</A> <A HREF="adminmanual.html#toc5.5">Removing databases</A>
133 </H2>
134
135 <P>To delete an existing database you use the <EM>dbremove</EM> command.
136 For example ...</P>
137 <P>
138 <BLOCKQUOTE><CODE>
139 <PRE>
140 dbremove oblast
141 </PRE>
142 </CODE></BLOCKQUOTE>
143 </P>
144 <P>would remove the oblast database and its associated datafile from the
145 system.  There are no warnings or recovery possible from this command.
146 If you remove a database it ceases to exist and would have to be created
147 from scratch if you still required it.</P>
148
149 <HR>
150 <A HREF="adminmanual-6.html">Next</A>
151 <A HREF="adminmanual-4.html">Previous</A>
152 <A HREF="adminmanual.html#toc5">Contents</A>
153 </BODY>
154 </HTML>