Commit a0e7d284 authored by Riccardo Padovani's avatar Riccardo Padovani

Updated scripts, moved to scripts folder

parent 8ca68635
......@@ -32,19 +32,19 @@ dump_input=${1}
dump_output=${2}
# Destroy previous temp database and create a new one
dropdb --if-exists $local_db
createdb $local_db
dropdb --if-exists "$local_db"
createdb "$local_db"
# Extract the file and import in psql
tar -xOvf $dumb_input | psql $local_db
tar -xOvf "$dump_input" | psql "$local_db"
# Scrub the database
psql $local_db < scrumb.sql
psql "$local_db" < scrub.sql
# Export the db
pg_dump $local_db > scrubbed-db.sql
tar -cvzf $dump_output scrubbed-db.sql
pg_dump "$local_db" > scrubbed-db.sql
tar -cvzf "$dump_output" scrubbed-db.sql
# Removed temporary files
dropdb --if-exists $local_db
dropdb --if-exists "$local_db"
rm -f scrubbed-db.sql
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment