Add script to pull down and mirror the prod database

This commit is contained in:
Rohan Mitchell
2013-10-16 12:04:29 +11:00
parent 631bc631fb
commit a898d6d831

7
script/mirror_prod.sh Executable file
View File

@@ -0,0 +1,7 @@
#!/bin/bash
set -e
echo "drop database open_food_web_dev" | psql -h localhost -U ofw open_food_web_test
echo "create database open_food_web_dev" | psql -h localhost -U ofw open_food_web_test
ssh ofw-prod "pg_dump -h localhost -U openfoodweb openfoodweb_production |gzip" |gunzip |psql -h localhost -U ofw open_food_web_dev