--- /dev/null
+#!/usr/bin/bash
+
+PGUSER=evergreen
+PGPASS=evergreen
+DB_STAMP=1305;
+STOCK_DB=evergreen;
+DATA_SOURCE_STAMP=1305;
+DATA_DB="eg_$DB_STAMP";
+SCHEMA_EXPORT="/tmp/eg-$DB_STAMP.schema.sql"
+
+# Extract the stock schema
+pg_dump -U $PGUSER --schema-only --format custom --file $SCHEMA_EXPORT $STOCK_DB
+
+# Extract the data from our data-full database
+# pg_dump -U $PGUSER --data-only --format custom --file Open-ILS/src/sql/Pg/data-snapshots/eg-$DATA_SOURCE_STAMP.data.sql $STOCK_DB
+
+# Create a new database from the stock schema.
+# This will have no schema or data
+sudo perl Open-ILS/src/support-scripts/eg_db_config --create-database --user $PGUSER --password $PGPASS --hostname localhost --database $DATA_DB
+
+# Apply the stock schema to the new database (without data)
+pg_restore -U $PGUSER --dbname $DATA_DB $SCHEMA_EXPORT
+
+# Load the full sample data into our new schema-only database
+pg_restore -U evergreen --dbname $DATA_DB --disable-triggers Open-ILS/src/sql/Pg/data-snapshots/eg-$DATA_SOURCE_STAMP.data.sql