------------------------------------------------------------ revno: 11050 committer: Bob Jolliffe <[email protected]> branch nick: dhis2 timestamp: Tue 2013-05-28 14:46:15 +0100 message: Fixed small typos in restoredb modified: tools/dhis2-tools-deb/pkg/usr/bin/dhis2-restoredb
-- lp:dhis2 https://code.launchpad.net/~dhis2-devs-core/dhis2/trunk Your team DHIS 2 developers is subscribed to branch lp:dhis2. To unsubscribe from this branch go to https://code.launchpad.net/~dhis2-devs-core/dhis2/trunk/+edit-subscription
=== modified file 'tools/dhis2-tools-deb/pkg/usr/bin/dhis2-restoredb' --- tools/dhis2-tools-deb/pkg/usr/bin/dhis2-restoredb 2013-05-28 12:06:12 +0000 +++ tools/dhis2-tools-deb/pkg/usr/bin/dhis2-restoredb 2013-05-28 13:46:15 +0000 @@ -14,14 +14,15 @@ exit 1 fi +INSTANCE=$1 DHIS2_USER=$INSTANCE DHIS2_DB=$INSTANCE DHIS2_BASE=/var/lib/dhis2/$DHIS2_USER -BACKUP=$DHIS2_BASE/backup/snapshot_$(date +%Y%m%d%M%S).sql.bz2 +BACKUP=$DHIS2_BASE/backups/snapshot_$(date +%Y%m%d%M%S).sql.bz2 # stop tomcat and take a snapshot backup of the current database before doing anything dhis2-shutdown $INSTANCE -sudo -u postgres pg_dump -O $INSTANCE | bzip2 > $BACKUP +sudo -u postgres pg_dump -T aggregated* -T analytics* -T completeness* -O $INSTANCE | bzip2 > $BACKUP # drop and recreate a new blank database sudo -u postgres dropdb $DHIS2_DB @@ -31,4 +32,4 @@ cat $2 | sudo -u postgres psql $DHIS2_DB # restart tomcat -dhis2-startup $INSTANCE \ No newline at end of file +dhis2-startup $INSTANCE
_______________________________________________ Mailing list: https://launchpad.net/~dhis2-devs Post to : [email protected] Unsubscribe : https://launchpad.net/~dhis2-devs More help : https://help.launchpad.net/ListHelp

