From bedd2c48d14ac7c2bfd27a8129537e270f13edf1 Mon Sep 17 00:00:00 2001 From: Christoph Haas Date: Fri, 26 Jun 2015 21:18:17 +0200 Subject: [PATCH] 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. --- bin/get-data-from-old-live-server.sh | 10 ++++++---- 1 file changed, 6 insertions(+), 4 deletions(-) diff --git a/bin/get-data-from-old-live-server.sh b/bin/get-data-from-old-live-server.sh index b01291d..548ac84 100755 --- a/bin/get-data-from-old-live-server.sh +++ b/bin/get-data-from-old-live-server.sh @@ -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 +