adding full export script
authorJames Fournie <jfournie@sitka.bclibraries.ca>
Sat, 10 Sep 2011 03:50:48 +0000 (20:50 -0700)
committerJames Fournie <jfournie@sitka.bclibraries.ca>
Sat, 10 Sep 2011 03:50:48 +0000 (20:50 -0700)
marc_export_custom/sitka-full-export.sh [new file with mode: 0644]

diff --git a/marc_export_custom/sitka-full-export.sh b/marc_export_custom/sitka-full-export.sh
new file mode 100644 (file)
index 0000000..4501c53
--- /dev/null
@@ -0,0 +1,19 @@
+#!/bin/bash
+
+cd /srv/openils/bin
+
+DATABASE=evergreen
+FULL_QUERY="select id from biblio.record_entry where not deleted"
+POSTSEC_QUERY="select * FROM asset.call_number where owning_lib in (select id from actor.org_unit_descendants(27)) and not deleted and label != '##URI##';"
+
+# full dump for outlook public libraries
+psql -A -t -c "$FULL_QUERY" $DATABASE\
+|./marc_export_custom --config /srv/openils/conf/opensrf_core.xml --items --location SITKA --collapse_to_depth 2 --exclusion_ini sitka_full_outlook.ini 
+
+# media for BC ELN post-secondary libraries
+psql -A -t -c "$POSTSEC_QUERY" $DATABASE\
+|./marc_export_custom --config /srv/openils/conf/opensrf_core.xml --items --location SITKA --collapse_to_depth 2 --exclusion_ini bc_eln_media.ini 
+~
+# serials for BC ELN post-secondary libraries
+psql -A -t -c "$POSTSEC_QUERY" $DATABASE\
+|./marc_export_custom --config /srv/openils/conf/opensrf_core.xml --items --location SITKA --collapse_to_depth 2 --exclusion_ini bc_eln_serials.ini