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:
parent
cefa804f54
commit
bedd2c48d1
1 changed files with 6 additions and 4 deletions
|
|
@ -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
|
||||
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue