Fixed data migration script

Development database is "localhost" again.
rsync is sped up by just checking the size of the files
Automatic db:migrate is called at the end.
This commit is contained in:
Christoph Haas 2015-06-26 21:18:17 +02:00
parent cefa804f54
commit bedd2c48d1

View file

@ -3,14 +3,14 @@
#IMAGE_DEST=../public
IMAGE_DEST=public
#IMAGE_DEST=/local/screenshots
#DB_HOST=localhost
DB_HOST=torf
DB_HOST=localhost
#DB_HOST=torf
echo Getting screenshot files
rsync -v root@screenshots.debian.net:/home/debshots/debshots-screenshots.tar /tmp
rsync -v --size-only root@screenshots.debian.net:/home/debshots/debshots-screenshots.tar /tmp
echo Getting PostgreSQL dump
rsync -v root@screenshots.debian.net:/home/debshots/debshots.sql /tmp
rsync -v --size-only root@screenshots.debian.net:/home/debshots/debshots.sql /tmp
echo Dropping existing database
set +e
@ -37,3 +37,5 @@ tar -C $IMAGE_DEST -xf /tmp/debshots-screenshots.tar
#rm -r public/live
ln -fs public/live/screenshots/approved public/screenshots
rake db:migrate