Skip to content
Fraser Harris edited this page Jun 11, 2015 · 6 revisions

Generate DB Dump

Local VM

  • ssh into the virtual machine
  • log in as postgres: sudo -u postgres -i
  • run the command pg_dump sfdb > output.txt
  • once the db dump is complete exit postgres
  • run sudo mv /var/lib/postgres/output.txt /opt/secondfunnel/app/output.txt

NOTE: /var/lib/postgres/ 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 > output.txt
  • use the database password in /SecondFunnel/ansible/group_vars/[production|stage].yml

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/output.txt output.txt

Clone this wiki locally