You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
run sudo mv /var/lib/postgresql/db.dump /opt/secondfunnel/app/db.dump
NOTE: /var/lib/postgresql/ is the home directory of postgres. Double check that this is true if the last command is not working for you.
Remote Machine
ssh into a production or stage server (ssh willet@__server_ip_address__)
run the command pg_dump sfdb > db.dump
use the database password in /SecondFunnel/ansible/group_vars/[production|stage].yml
NOTE: If you are copying the database from production/stage to vagrant, you need to make sure you do not copy owners & privileges: pg_dump --no-owner --no-privileges sfdb > db.dump. When you pg_restore from the db.dump, you will need to make sure the db is assigned an owner using: createdb -O __owner_name__ sfdb. See /SecondFunnel/ansible/group_vars/vagrant.yml for db owner name.
Move DB Dump
once the db dump is complete, exit to local
download db dump to local: scp willet@__server_ip_address__:/opt/secondfunnel/app/db.dump db.dump