adding convenience script for dumping test DBs
authorChris Sharp <csharp@georgialibraries.org>
Wed, 1 Nov 2017 13:34:59 +0000 (09:34 -0400)
committerChris Sharp <csharp@georgialibraries.org>
Wed, 1 Nov 2017 13:34:59 +0000 (09:34 -0400)
db/dump_db_for_test.sh [new file with mode: 0644]

diff --git a/db/dump_db_for_test.sh b/db/dump_db_for_test.sh
new file mode 100644 (file)
index 0000000..a133ffa
--- /dev/null
@@ -0,0 +1,15 @@
+#!/bin/bash
+
+PGUSER=evergreen pg_dump -v -F c \
+    --exclude-table-data=auditor.acq_invoice_item_history \
+    --exclude-table-data=auditor.serial_unit_history \
+    --exclude-table-data=auditor.asset_copy_history \
+    --exclude-table-data=auditor.biblio_record_entry_history \
+    --exclude-table-data=auditor.actor_usr_address_history \
+    --exclude-table-data=auditor.asset_call_number_history \
+    --exclude-table-data=auditor.actor_usr_history \
+    --exclude-table-data=auditor.acq_invoice_history \
+    --exclude-table-data=auditor.acq_invoice_entry_history \
+    --exclude-table-data=auditor.actor_org_unit_history \
+    --exclude-table-data=reporter.schedule \
+    evergreen > pines-prod-no-auditor-`date +%F`.dmp