Using localhost Postgres instance. Populating test and dev, too.
This commit is contained in:
parent
979deabb29
commit
8bf4190b0f
1 changed files with 10 additions and 4 deletions
|
|
@ -1,9 +1,9 @@
|
||||||
#!/bin/sh -ex
|
#!/bin/sh -ex
|
||||||
|
|
||||||
#IMAGE_DEST=../public
|
IMAGE_DEST=public/screenshots
|
||||||
IMAGE_DEST=/local/screenshots
|
#IMAGE_DEST=/local/screenshots
|
||||||
#DB_HOST=localhost
|
DB_HOST=localhost
|
||||||
DB_HOST=torf
|
#DB_HOST=torf
|
||||||
|
|
||||||
echo Getting screenshot files
|
echo Getting screenshot files
|
||||||
rsync -v root@screenshots.debian.net:/home/debshots/debshots-screenshots.tar /tmp
|
rsync -v root@screenshots.debian.net:/home/debshots/debshots-screenshots.tar /tmp
|
||||||
|
|
@ -14,13 +14,19 @@ rsync -v root@screenshots.debian.net:/home/debshots/debshots.sql /tmp
|
||||||
echo Dropping existing database
|
echo Dropping existing database
|
||||||
set +e
|
set +e
|
||||||
psql -h $DB_HOST postgres debshots -c 'drop database debshots'
|
psql -h $DB_HOST postgres debshots -c 'drop database debshots'
|
||||||
|
psql -h $DB_HOST postgres debshots -c 'drop database debshots_dev'
|
||||||
|
psql -h $DB_HOST postgres debshots -c 'drop database debshots_test'
|
||||||
set -e
|
set -e
|
||||||
|
|
||||||
echo Creating new database
|
echo Creating new database
|
||||||
psql -h $DB_HOST postgres debshots -c 'create database debshots owner debshots'
|
psql -h $DB_HOST postgres debshots -c 'create database debshots owner debshots'
|
||||||
|
psql -h $DB_HOST postgres debshots -c 'create database debshots_dev owner debshots'
|
||||||
|
psql -h $DB_HOST postgres debshots -c 'create database debshots_test owner debshots'
|
||||||
|
|
||||||
echo Restoring PostgreSQL dump
|
echo Restoring PostgreSQL dump
|
||||||
psql -h $DB_HOST debshots debshots < /tmp/debshots.sql
|
psql -h $DB_HOST debshots debshots < /tmp/debshots.sql
|
||||||
|
psql -h $DB_HOST debshots_dev debshots < /tmp/debshots.sql
|
||||||
|
psql -h $DB_HOST debshots_test debshots < /tmp/debshots.sql
|
||||||
|
|
||||||
echo Unpacking screenshots tarball
|
echo Unpacking screenshots tarball
|
||||||
#cd ../public
|
#cd ../public
|
||||||
|
|
|
||||||
Loading…
Add table
Add a link
Reference in a new issue