The major advantages of the command line approach are its speed and its convenience for system administrators who can perform bulk loads of authority records in a controlled environment. For alternate instructions, see Importing Authority Records from the Staff Client.
Run marc2are.pl against the authority records, specifying the user
name, password, MARC type (USMARC or XML). Use STDOUT
redirection to
either pipe the output directly into the next command or into an output
file for inspection. For example, to process a file with authority records
in MARCXML format named auth_small.xml
using the default user name and
password, and directing the output into a file named auth.are
:
cd Open-ILS/src/extras/import/ perl marc2are.pl --user admin --pass open-ils --marctype XML auth_small.xml > auth.are
The MARC type will default to USMARC if the --marctype
option is not specified.
Run parallel_pg_loader.pl to generate the SQL necessary for importing the
authority records into your system. This script will create files in your
current directory with filenames like pg_loader-output.are.sql
and
pg_loader-output.sql
(which runs the previous SQL file). To continue with the
previous example by processing our new auth.are
file:
cd Open-ILS/src/extras/import/ perl parallel_pg_loader.pl --auto are --order are auth.are
To save time for very large batches of records, you could simply pipe the output of marc2are.pl directly into parallel_pg_loader.pl.
Load the authority records from the SQL file that you generated in the last step into your Evergreen database using the psql tool. Assuming the default user name, host name, and database name for an Evergreen instance, that command looks like:
psql -U evergreen -h localhost -d evergreen -f pg_loader-output.sql