WebFaction
Community site: login faq

Hello,

Just curious if anyone could provide instructions on steps I would take to export SQL from production (WebFaction phpPgAdmin) and import on local dev using pgAdmin3 (and postgres.app)?

I'd just like a quick way to get production data into my development machine; I'd like to have the production dump wipe my dev database and insert the latest dumped data. Optimally, I would like to do as much of this as possible via that web and application interfaces (though, I'm not opposed to command line solutions).

Anyone out there have this already documented and feel like sharing their steps? :)

This is for a Django app development workflow.

Thank you!

Edit:

Here's what I have so far:


  1. Login to WebFaction’s Control Panel and go to the Databases section.
  2. Click on the phpPgAdmin link.
  3. Login to phpPgAdmin.
  4. In the left pane of the phpPgAdmin window, expand Servers, expand PostgreSQL, and then click the name of the database that you want to export.
  5. On the top menu bar, click “Export” (far right).
  6. Under Format, click Structure and data.
  7. Under Options, in the Format list box, select SQL.
  8. Under Options, click Download.
  9. Click “Export”.
  10. On your local machine, start psql and open pgAdmin3.
  11. In pgAdmin3, right-click on the database and select Delete/Drop…
  12. Re-create the database by right-clicking on "Databases" icon and choosing "New Database…"; just input the name and and click “OK”.
  13. Click on Plugins > PSQL Console.
  14. From the command line, run:

$ \i /path/to/your-dumped-phpPgAdmin.sql

Tip: From the command line, you can type \i and then drag/drop the .sql file into the the terminal window and hit return key.


Can the above process be improved?

asked 01 Feb '15, 05:43

mhulse
411617
accept rate: 0%

edited 01 Feb '15, 06:59

Be the first one to answer this question!
toggle preview

Follow this question

By Email:

Once you sign in you will be able to subscribe for any updates here

By RSS:

Answers

Answers and Comments

Markdown Basics

  • *italic* or _italic_
  • **bold** or __bold__
  • link:[text](http://url.com/ "title")
  • image?![alt text](/path/img.jpg "title")
  • numbered list: 1. Foo 2. Bar
  • to add a line break simply add two spaces to where you would like the new line to be.
  • basic HTML tags are also supported

Question tags:

×909
×108
×36
×21

question asked: 01 Feb '15, 05:43

question was seen: 4,983 times

last updated: 01 Feb '15, 06:59

WEBFACTION
REACH US
SUPPORT
AFFILIATE PROGRAM
LEGAL
© COPYRIGHT 2003-2019 SWARMA LIMITED - WEBFACTION IS A SERVICE OF SWARMA LIMITED
REGISTERED IN ENGLAND AND WALES 5729350 - VAT REGISTRATION NUMBER 877397162
5TH FLOOR, THE OLD VINYL FACTORY, HAYES, UB3 1HA, UNITED KINGDOM