[ckan-changes] commit/ckanext-dgu: dread: [package]: Step to restore db.

Bitbucket commits-noreply at bitbucket.org
Wed Aug 10 13:47:45 UTC 2011


1 new changeset in ckanext-dgu:

http://bitbucket.org/okfn/ckanext-dgu/changeset/6f56e4acddcb/
changeset:   6f56e4acddcb
user:        dread
date:        2011-08-10 15:47:19
summary:     [package]: Step to restore db.
affected #:  1 file (246 bytes)

--- a/package/usr/bin/ckan-dgu-install	Wed Aug 10 12:44:32 2011 +0100
+++ b/package/usr/bin/ckan-dgu-install	Wed Aug 10 14:47:19 2011 +0100
@@ -119,6 +119,13 @@
 echo "Ensuring the ${INSTANCE} database exists ..."
 ckan_ensure_db_exists ${INSTANCE}
 
+if [ -f /etc/ckan/${INSTANCE}/latest.dump ] ; then
+    echo "Restoring from the latest dump"
+    paster --plugin=ckan db load --config=/etc/ckan/${INSTANCE}/${INSTANCE}.ini /etc/ckan/${INSTANCE}/latest.dump
+else
+    echo "No dump to install"
+fi
+
 # Install the harvesting init scripts
 if ! [ -f /etc/rc2.d/S25${INSTANCE}_harvest_gather ] ; then
     echo "Creating the harvester gather consumers ..."

Repository URL: https://bitbucket.org/okfn/ckanext-dgu/

--

This is a commit notification from bitbucket.org. You are receiving
this because you have the service enabled, addressing the recipient of
this email.




More information about the ckan-changes mailing list