]> git.evergreen-ils.org Git - working/Evergreen.git/blob - 1.6/admin/migratingdata.xml
8494904d437d80c1c35c49656e4f41bd5196546c
[working/Evergreen.git] / 1.6 / admin / migratingdata.xml
1 <?xml version='1.0' encoding='UTF-8'?>\r
2 <chapter xmlns="http://docbook.org/ns/docbook" xmlns:xi="http://www.w3.org/2001/XInclude"\r
3             xmlns:xl="http://www.w3.org/1999/xlink" version="5.0" xml:id="migratingdata" >\r
4         <info>          \r
5         <title>Migrating Data</title>\r
6                 <abstract>\r
7                         <para>Migrating data into Evergreen can be one of the most daunting tasks for an administrator. This chapter will explain some procedures to help to migrate \r
8                         bibliographic records, copies and patrons into the Evergreen system. This chapter requires advanced ILS Administration experience, knowledge of Evergreen data structures, \r
9                         as well as knowledge of how to export data from your current system or access to data export files from your current system.</para>\r
10                 </abstract>\r
11         </info>    \r
12         <section xml:id="migratingbibrecords">\r
13                 <title>Migrating Bibliographic Records</title>\r
14                 <para>\r
15                 One of the most important and challenging  tasks is migrating your bibliographic records to a new system. The procedure may be different depending on the system from which you \r
16                 are migrating  and the content of the marc records exported from the existing system. The proecedures in this section deal with the process once the data from the existing system \r
17                 is exporterd into marc records. It does not cover exporting data from your existing non-Evergreen system.</para>\r
18                 <para>Several tools for importing bibliographic records into Evergreen can be found in the Evergreen installation folder \r
19                 (<filename class="directory">/home/opensrf/Evergreen-ILS-1.6.1.2/Open-ILS/src/extras/import/</filename> ) and are also available from the Evergreen repository \r
20                 (<link xl:href="http://svn.open-ils.org/trac/ILS/browser/branches/rel_1_6_1/Open-ILS/src/extras/import" xl:title="import scripts - Evergreen repository">\r
21                 http://svn.open-ils.org/trac/ILS/browser/branches/rel_1_6_1/Open-ILS/src/extras/import</link>).</para> \r
22                 <simplesect>\r
23                         <title>Converting MARC records to Evergreen BRE JSON format</title>\r
24                         <para>If you are starting with MARC records from your existing system or another source, use the marc2bre.pl script to create the JSON representation of a bibliographic \r
25                         record entry (hence bre) in Evergreen. <filename>marc2bre.pl</filename> can perform the following functions:</para>\r
26                         <itemizedlist> \r
27                                 <listitem><para>Converts <systemitem>MARC-8</systemitem> encoded records to <systemitem>UTF-8</systemitem> encoding</para></listitem>\r
28                                 <listitem><para>Converts <systemitem>MARC21</systemitem> to <systemitem>MARCXML21</systemitem></para></listitem>\r
29                                 <listitem><para>Select the unique record number field (common choices are '035' or '001'; check your records as you might be surprised how a supposedly unique field \r
30                                 actually has duplicates, though marc2bre.pl will select a unique identifier for subsequent duplicates)</para></listitem>\r
31                                 <listitem><para>Extracts certain pertinent fields indexing and display purposes (along with the complete MARCXML21 record)</para></listitem>\r
32                                 <listitem><para>Sets the ID number of the first record from this batch to be imported into the biblio.record_entry table (hint - run the following \r
33                                 <systemitem>SQL</systemitem> to determine what this number should be to avoid conflicts:</para>\r
34 <screen>\r
35 <userinput>psql -U postgres evergreen</userinput>\r
36 <userinput> # SELECT MAX(id)+1 FROM biblio.record_entry;</userinput>\r
37 </screen>\r
38                         </listitem>\r
39                         <listitem>\r
40                                 <para>If you are processing multiple sets of MARC records with <command>marc2bre.pl</command>before loading the records into the database, you will need to keep track \r
41                                 of the starting ID number for each subsequent batch of records that you are importing. For example, if you are processing three files of MARC records with 10000 \r
42                                 records each into a clean database, you would use <option>–startid 1</option>, <option>–startid 10001</option>, and <option>–startid 20001</option> \r
43                                 parameters for each respective file.</para>\r
44                         </listitem>\r
45                         <listitem>\r
46                                 <para>Ignore <quote>trash</quote> fields that you do not want to retain in Evergreen</para>\r
47                         </listitem>\r
48                         <listitem>\r
49                                 <para>If you use <filename>marc2bre.pl</filename> to convert your MARC records from the <systemitem>MARC-8</systemitem> encoding to the UTF-8 encoding, it relies\r
50                                  on the <systemitem>MARC::Charset Perl</systemitem> module to complete the conversion. When importing a large set of items, you can speed up the process by using a \r
51                                 utility like <systemitem>marc4j</systemitem> or <systemitem>marcdumper</systemitem> to convert the records \r
52                                 to <systemitem>MARC21XML</systemitem> and <systemitem>UTF-8</systemitem> before running them through <command>marc2bre.pl</command> with the \r
53                                 <option>–marctype=XML</option> flag to tell <command>marc2bre.pl</command> that the records are already in <systemitem>MARC21XML</systemitem> format with \r
54                                 the <systemitem>UTF-8 </systemitem>encoding. If you take this approach, due to a current limitation of <systemitem>MARC::File::XML</systemitem> you have to do a \r
55                                 horrible thing and ensure that there are no namespace prefixes in front of the element names. <filename>marc2bre.pl</filename> cannot parse the following \r
56                                 example:</para>\r
57 \r
58 <programlisting language="xml">\r
59 <![CDATA[\r
60 \r
61 <?xml version="1.0" encoding="UTF-8" ?>\r
62 <marc:collection xmlns:marc="http://www.loc.gov/MARC21/slim" \r
63   xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" \r
64   xsi:schemaLocation="http://www.loc.gov/MARC/slim http://www.loc.gov/standards/marcxml/schema/MARC21slim.xsd">\r
65   <marc:record>\r
66     <marc:leader>00677nam a2200193 a 4500</marc:leader>\r
67     <marc:controlfield tag="001">H01-0000844</marc:controlfield>\r
68     <marc:controlfield tag="007">t </marc:controlfield>\r
69     <marc:controlfield tag="008">060420s1950    xx            000 u fre d</marc:controlfield>\r
70     <marc:datafield tag="040" ind1=" " ind2=" ">\r
71       <marc:subfield code="a">CaOHCU</marc:subfield>\r
72       <marc:subfield code="b">fre</marc:subfield>\r
73     </marc:datafield>\r
74 ...\r
75 ]]>;\r
76 </programlisting>\r
77                         \r
78                         <para>But marc2bre.pl can parse the same example with the namespace prefixes removed:</para>\r
79 <programlisting language="xml">\r
80 <![CDATA[\r
81 <?xml version="1.0" encoding="UTF-8" ?>\r
82 <collection xmlns:marc="http://www.loc.gov/MARC21/slim" \r
83   xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" \r
84   xsi:schemaLocation="http://www.loc.gov/MARC/slim http://www.loc.gov/standards/marcxml/schema/MARC21slim.xsd">\r
85   <record>\r
86     <leader>00677nam a2200193 a 4500</leader>\r
87     <controlfield tag="001">H01-0000844</controlfield>\r
88     <controlfield tag="007">t </controlfield>\r
89     <controlfield tag="008">060420s1950    xx            000 u fre d</controlfield>\r
90     <datafield tag="040" ind1=" " ind2=" ">\r
91       <subfield code="a">CaOHCU</subfield>\r
92       <subfield code="b">fre</subfield>\r
93     </datafield>\r
94 ...\r
95 ]]>;\r
96 </programlisting>\r
97                                 </listitem>\r
98                         </itemizedlist>\r
99                 </simplesect>\r
100                 <simplesect>\r
101                         <title>Converting Records for Import into PostgreSQL</title>\r
102                         <para>Once you have your records in Evergreen's <systemitem>BRE JSON</systemitem> format, you then need to use <command>direct_ingest.pl</command> to convert the records \r
103                         into the generic ingest <systemitem>JSON</systemitem> format for Open-ILS. \r
104                         This step uses the <systemitem>open-ils.ingest</systemitem> application to extract the data that will be indexed in the database. </para>\r
105                         <para>Once you have your records in Open-ILS <systemitem>JSON</systemitem> ingest format, you then need to use <command>pg_loader.pl</command> to convert these records into a \r
106                         set of <systemitem>SQL</systemitem> statements that you can use to \r
107                         load the records into PostgreSQL. The <option>–order</option> and <option>–autoprimary</option> command line options (bre, mrd, mfr, etc) map to class IDs defined in \r
108                         <filename>/openils/conf/fm_IDL.xml</filename>.</para>\r
109                 </simplesect>           \r
110                 <simplesect>\r
111                         <title>Adding Metarecords to the Database</title>\r
112                         <para>One you have loaded the records into PostgreSQL, you can create metarecord entries in the <link linkend="metabib.table.metarecord">metabib.metarecord</link> table by                             running the following <systemitem>SQL</systemitem>:</para>\r
113 <screen>\r
114 <userinput>psql evergreen</userinput>\r
115 <userinput># \i /home/opensrf/Evergreen-ILS-1.6*/src/extras/import/quick_metarecord_map.sql</userinput>\r
116 </screen>\r
117                         <para>Metarecords are required to place holds on items, among other actions.</para>\r
118                 </simplesect>   \r
119         </section>\r
120         <section xml:id="migratingbibrecordcopies">\r
121                 <title>Adding Copies to Bibliographic Records</title>   \r
122                 <para>Once you've loaded the bibliographic records in Evergreen, you can search and view the records in the staff client, but they will not be visible in the catalogue. By \r
123                 default, bibliographic records will not be visible in the catalogue until you add a copy representing a physical manifestation of that resource. You can add a copy manually through \r
124                 the staff client via the Holdings maintenance screen, but if you're bulk-importing MARC records you probably want to bulk load the associated copies, call numbers, and barcodes as \r
125                 well.</para>\r
126                 <simplesect>\r
127                         <title>Importing volumes and copies from <systemitem>MARC21XML</systemitem> holdings</title>\r
128                         <para>There is currently no simple method for importing holdings based on the contents of the MARC holdings field (852, as specified by \r
129                         <link xml:href="http://www.loc.gov/marc/holdings/">http://www.loc.gov/marc/holdings/</link>). \r
130                         However, a more or less automated method could be built that performs the following steps:</para>\r
131                         <procedure>\r
132                                 <step><para>Create a tab-delimited file that contains your holdings information</para>\r
133                                 <itemizedlist>\r
134                                         <listitem>Required fields: bibliographic ID, barcode, and call number</listitem>                \r
135                                         <listitem>Optional fields: shelving location (text) – see  the <link linkend="asset.table.copy">asset.copy table</link> for \r
136                                         possible fields to include</listitem>\r
137                                 </itemizedlist>         \r
138                                 </step>\r
139                                 <step><para>Create a staging table that matches the contents of your tab-delimited file.</para>\r
140                                 </step>\r
141                                 <step><para>Insert the contents of your tab-delimited file into the table.</para>\r
142                                 </step>\r
143                                 <step><para>Generate <systemitem>SQL</systemitem> scripts for item import to match the staging table that you created.</para>\r
144                                 </step>\r
145                                 <step><para>Run the <systemitem>SQL</systemitem> scripts to create the holdings in Evergreen.</para>\r
146                                 </step>\r
147                         </procedure>\r
148                         <para>If an ILS has the concept of <quote>item categories</quote>, these may be mapped to Evergreen via statistical categories in the \r
149                         <link linkend="asset.table.stat_cat">asset.stat_cat table</link> . Note that statistical categories cannot be used as search filters; individual branches can define \r
150                         their own statistical categories; and define their own statistical category entries for individual items - best use case for statistical categories is probably for gifts.</para>\r
151                         <para>In 2009, Conifer placed their <link xl:href="http://svn.open-ils.org/trac/ILS-Contrib/browser/conifer/branches/rel_1_6_1/tools/migration-scripts"  \r
152                         xl:title="Conifer migration tools">migration tools</link> \r
153                         in the <link xl:href="http://svn.open-ils.org/trac/ILS-Contrib/browser/conifer" xl:title="Conifer ILS-Contrib SVN repository">Conifer ILS-Contrib SVN repository</link>, which might be useful samples augmenting the \r
154                         basic staging table import approach.</para>\r
155                         <para>In 2010, Equinox contributed a set of <link xl:href="http://git.esilibrary.com/?p=migration-tools.git;a=summary"  xl:title="Equinox migration utilities">migration utilities</link></para>\r
156                 </simplesect>\r
157         </section>\r
158         <section xml:id="migratingpatrons">\r
159                 <title>Migrating Patron Data</title>\r
160                 <para>\r
161                 This section will explain the task of migrating your patron data from comma delimited files<indexterm><primary>comma delimited files</primary></indexterm> into Evergreen. \r
162                 It does not deal with the process of exporting from the non-Evergreen \r
163                 system since this process may vary depending on where you are extracting your patron records. Patron could come from an ILS or it could come from a student database in the case of \r
164                 academic records.               \r
165                 </para>\r
166                 <para>When importing records into Evergreen you will need to populate 3 tables in your Evergreen database:</para>\r
167                 <itemizedlist>\r
168                         <listitem><link linkend="actor.table.usr">actor.usr</link> - The main table for user data</listitem>\r
169                         <listitem><link linkend="actor.table.card">actor.card</link> - Stores the barcode for users; Users can have more than 1 card but only 1 can be active at a given time;</listitem>\r
170                         <listitem><link linkend="actor.table.usr-address">actor.usr_address</link> - Used for storing address information; A user can have more than one address.</listitem>\r
171                 </itemizedlist>\r
172                 <para>Before following the procedures below to import patron data into Evergreen, it is a good idea to examine the fields in these tables in order to decide on a strategy \r
173                 for data to include \r
174                 in your import. It is important to understand the data types and constraints on each field.</para>\r
175                 <procedure>\r
176                         <step>\r
177                                 <para>Export the patron data from your existing ILS or from another source into a comma delimited file. The comma delimited file used for importing\r
178                                  the records should use Unicode (UTF8) <indexterm><primary>Unicode</primary></indexterm> character encoding.</para>\r
179                         </step>\r
180                         <step>\r
181                                 <para>Create a staging table.<indexterm><primary>staging table</primary></indexterm>  A staging table will allow you to tweak the data before importing. \r
182                                 Here is an example sql statement:</para>\r
183                                 <indexterm><primary>sql</primary></indexterm> \r
184 <programlisting language="sql">\r
185 CREATE TABLE students (\r
186         student_id int, barcode text, last_name text, first_name text, program_number text, program_name text, email text, address_type text, street1 text, \r
187         street2 text, city text, province text, country text, postal_code text, phone text, profile int, ident_type int, home_ou int, \r
188         claims_returned_count int DEFAULT 0, usrname text, net_access_level int DEFAULT 2, password text\r
189 ); \r
190 </programlisting>\r
191                                 <para>Note the <varname>DEFAULT</varname> variables. These allow you to set default for your library or to populate required fields if you data allows \r
192                                 <systemitem>NULL</systemitem> values where fields are required in Evergreen.</para>\r
193                         </step>\r
194                         <step>\r
195                                 <para>Formatting of some fields to fit Evergreen filed formatting may be required. Here is an example of sql to adjust phone numbers in the staging \r
196                                 table to fit the evergreen field:</para>\r
197 <programlisting language="sql">\r
198 UPDATE students phone = replace(replace(replace(rpad(substring(phone from 1 for 9), 10, '-') || substring(phone from 10), '(', ''), ')', ''), ' ', '-');\r
199 </programlisting>\r
200                                 <para>Data <quote>massaging</quote> may be required to fit formats used in Evergreen.</para>\r
201                         </step>\r
202                         <step>\r
203                                 <para>Insert records from the staging table into the <link linkend="actor.table.usr">actor.usr</link> Evergreen table:</para>\r
204 <programlisting language="sql">\r
205  INSERT INTO actor.usr (\r
206         profile, usrname, email, passwd, ident_type, ident_value, first_given_name, family_name, day_phone, home_ou, claims_returned_count, \r
207         net_access_level) \r
208         SELECT profile, students.usrname, email, student_id, ident_type, student_id, first_name, last_name, phone, home_ou, claims_returned_count, \r
209         net_access_level \r
210         FROM students;\r
211 </programlisting>                       \r
212                         </step>\r
213                         <step>\r
214                                 <para>insert records into <link linkend="actor.table.card">actor.card</link> from <link linkend="actor.table.usr">actor.usr</link>.</para>\r
215 <programlisting language="sql">\r
216 INSERT INTO actor.card (usr, barcode) \r
217         SELECT actor.usr.id, students.barcode \r
218         FROM students \r
219                 INNER JOIN actor.usr \r
220                         ON students.usrname = actor.usr.usrname;\r
221 </programlisting>               \r
222                                 <para>This assumes a one to one card patron relationship. If your patron data import has multiple cards assigned to one patron more complex import scripts may be required                                      which look for inactive or active flags.</para> \r
223                         </step>\r
224                         <step>\r
225                                 <para>Update actor.usr.card field with actor.card.id to associate active card with the user:</para>\r
226 <programlisting language="sql">\r
227 UPDATE actor.usr \r
228         SET card = actor.card.id \r
229         FROM actor.card \r
230         WHERE actor.card.usr = actor.usr.id;\r
231 </programlisting>                       \r
232                         </step>\r
233                         <step>\r
234                                 <para>Insert records into <link linkend="actor.table.usr-address">actor.usr_address</link> to add address information for users:</para>\r
235 <programlisting language="sql">\r
236 INSERT INTO actor.usr_address (usr, street1, street2, city, state, country, post_code) \r
237         SELECT actor.usr.id, students.street1, students.street2, students.city, students.province, students.country, students.postal_code \r
238         FROM students \r
239         INNER JOIN actor.usr ON students.usrname = actor.usr.usrname;\r
240 </programlisting>                       \r
241                         </step>\r
242                         <step>\r
243                                 <para>update <link linkend="actor.table.usr-address">actor.usr.address</link> with address id from address table.</para>\r
244 <programlisting language="sql">\r
245 UPDATE actor.usr \r
246         SET mailing_address = actor.usr_address.id, billing_address = actor.usr_address.id \r
247         FROM actor.usr_address \r
248         WHERE actor.usr.id = actor.usr_address.usr;\r
249 </programlisting>       \r
250                         <para>This assumes 1 address per patron. More complex scenarios may require more sophisticated SQL.</para>              \r
251                         </step>\r
252                 </procedure>\r
253                 <simplesect>\r
254                         <title>Creating an sql Script for Importing Patrons</title>\r
255                         <para>The procedure for importing patron can be automated with the help of an sql script. Follow these steps to create an import script:</para>\r
256                 \r
257                         <procedure>\r
258                                 <step>\r
259                                         <para>Create an new file and name it <filename>import.sql</filename></para>\r
260 \r
261                                 </step>\r
262 \r
263                                 <step>\r
264                                         <para>Edit the file to look similar to this:</para>\r
265 <programlisting>\r
266 BEGIN;\r
267 \r
268 -- Create staging table.\r
269 CREATE TABLE students (\r
270         student_id int, barcode text, last_name text, first_name text, program_number text, program_name text, email text, address_type text, \r
271         street1 text, street2 text, city text, province text, country text, postal_code text, phone text, profile int, ident_type int, home_ou int, \r
272         claims_returned_count int DEFAULT 0, usrname text, net_access_level int DEFAULT 2, password text\r
273 ); \r
274 \r
275 \r
276 --Insert records from the staging table into the actor.usr table.\r
277 INSERT INTO actor.usr (\r
278         profile, usrname, email, passwd, ident_type, ident_value, first_given_name, family_name, day_phone, home_ou, claims_returned_count, \r
279         net_access_level) \r
280         SELECT profile, students.usrname, email, student_id, ident_type, student_id, first_name, last_name, phone, home_ou, claims_returned_count, \r
281         net_access_level FROM students;\r
282 \r
283 --Insert records from the staging table into the actor.usr table.\r
284 INSERT INTO actor.card (usr, barcode) \r
285         SELECT actor.usr.id, students.barcode \r
286         FROM students \r
287                 INNER JOIN actor.usr \r
288                         ON students.usrname = actor.usr.usrname;\r
289 \r
290 --Update actor.usr.card field with actor.card.id to associate active card with the user:\r
291 UPDATE actor.usr \r
292         SET card = actor.card.id \r
293         FROM actor.card \r
294         WHERE actor.card.usr = actor.usr.id;\r
295 \r
296 --INSERT records INTO actor.usr_address from staging table.\r
297 INSERT INTO actor.usr_address (usr, street1, street2, city, state, country, post_code) \r
298         SELECT actor.usr.id, students.street1, students.street2, students.city, students.province, students.country, students.postal_code \r
299         FROM students \r
300         INNER JOIN actor.usr ON students.usrname = actor.usr.usrname;\r
301 \r
302 \r
303 --Update actor.usr mailing address with id from actor.usr_address table.:\r
304 UPDATE actor.usr \r
305         SET mailing_address = actor.usr_address.id, billing_address = actor.usr_address.id \r
306         FROM actor.usr_address \r
307         WHERE actor.usr.id = actor.usr_address.usr;\r
308 \r
309 COMMIT;\r
310 </programlisting>\r
311                                         <para>Placing the sql statements between <code>BEGIN;</code> and <code>COMMIT;</code> creates a transaction block so that if any sql statements fail, the \r
312                                         entire process is canceled and the database is rolled back to its original state. Lines beginning with <code>--</code> are comments to let you you what \r
313                                         each sql statement is doing and are not processed.</para> \r
314                                 </step>\r
315                         </procedure>\r
316                 </simplesect>\r
317                 <simplesect>\r
318                         <title>Batch Updating Patron Data</title>\r
319                         <para>For academic libraries, doing batch updates to add new patrons to the Evergreen database is a critical task. The above procedures and \r
320                         import script can be easily adapted to create an update script for importing new patrons from external databases. If the data import file contains only new patrons, then, \r
321                         the above procedures will work well to insert those patrons. However, if the data load contains all patrons, a second staging table and a procedure to remove existing                          patrons from that second staging table may be required before importing the new patrons. Moreover, additional steps to update address information and perhaps delete \r
322                         inactive patrons may also be desired depending on the requirements of the institution.</para>\r
323                         <para>After developing the scripts to import and update patrons have been created, another important task for library staff is to develop an import strategy and schedule \r
324                         which suits the needs of the library. This could be determined by registration dates of your institution in the case of academic libraries. It is important to balance \r
325                         the convenience of patron loads and the cost of processing these loads vs staff adding patrons manually.</para>   \r
326                </simplesect> \r
327         </section>\r
328         <section xml:id="electronicresourcesvisible">   \r
329                 <title>Making electronic resources visible in the catalogue</title>\r
330                 <para>For electronic resources that should be visible in the catalogue without any copies, you must set the source column value in the record.biblio_entry row for the respective \r
331                 bibliographic record to a value that matches the corresponding ID of the <link linkend="config.table.bib-source">config.bib_source</link> where the transcendant value is \r
332                 <emphasis>TRUE</emphasis>. Here's a practical example:</para>\r
333                 <procedure>\r
334                          <step>\r
335                                 <para>Connect to your Evergreen database with <command>psql</command> (substitute username / database name as required):</para>\r
336 <screen>\r
337 <userinput>psql -U postgres evergreen</userinput>\r
338 </screen>\r
339                         </step>\r
340                          <step>\r
341                                 <para>Add a source for your electronic resources:</para>\r
342 <screen>\r
343 <userinput># INSERT INTO config.bib_source(quality, source, transcendant) VALUES (50, 'Institutional repository', TRUE);</userinput>\r
344 </screen>\r
345                         </step>\r
346                          <step>\r
347                                 <para>Find the ID that was generated for your new source:</para>\r
348 <screen>\r
349 <userinput># SELECT ID FROM config.bib_source WHERE source = 'Institutional repository';</userinput>\r
350 </screen>\r
351                         </step>\r
352                          <step>\r
353                                 <para>Update the source column for your bibliographic record for the electronic resource (for the sake of the example, let's assume that the ID returned from the new \r
354                                 source was 4, and that we know that the bib record with ID 75 is an electronic resource from your institutional repository):</para>\r
355 <screen>\r
356 <userinput># UPDATE biblio.record_entry SET source = 4 where biblio.record_entry.id=75;</userinput>\r
357 </screen>\r
358                         </step>\r
359                 </procedure>\r
360         </section>\r
361         <section xml:id="emptydatabase">\r
362                 <title>Restoring your Evergreen Database to an Empty State</title>\r
363                 <para>If you've done a test import of records and you want to quickly get Evergreen back to a pristine state, you can create a clean Evergreen database schema by performing the \r
364                 following:</para>\r
365                 <procedure>\r
366                         <step> \r
367 <screen>\r
368 <userinput>cd ILS/Open-ILS/src/sql/Pg/</userinput>\r
369 </screen>\r
370                         </step>\r
371                          <step> \r
372                                  <para>Rebuild the database schema:</para>\r
373 <screen>\r
374 <userinput>./build-db.sh [db-hostname> [db-port] [db-name] [db-user] [db-password] [db-version]</userinput>\r
375 </screen>\r
376                                 <caution><para>This will remove all of your data from the database and restore the default values.</para></caution>             \r
377                         </step>\r
378                 </procedure>\r
379         </section>\r
380 </chapter>\r