Dump from PostgreSQL Using PGAdmin

I was having trouble figuring out how to dump the data from PostgreSQL with PGAdmin until I have this on PostgreSQL Tutorial.

Following the directions, I was able to do a dump as .tar file.  They also have instructions on how to restore it.

PostgreSQL Backup Database - pgadmin backup

pgAdmin backup options

pgAdmin backup dump options 1

pgAdmin backup dump options 2

pgAdmin backup messages



Importing a MySQL Database in Windows

I switched computers and had to migrate my dev database.  I was able to export my old database, but had trouble importing it using phpmyadmin (actually, I couldn’t get phpmyadmin to work) and MySQL Workbench.  So I had to go into the Windows command prompt to do it.  Here’s what I did after generating a dump (ie your_database_name.sql) which contained the SQL and data to rebuild the DB.  To make this work, the database needs to be created (ie rake db:create), but the tables must not exist yet (or you’ll get a SQL error telling you that the table already exists).

(1) saved the your_database_name.sql to: users/your_user_name on the PC

(2) started the command prompt (start menu >search for programs -> cmd)

(3) typed mysql -u USERNAME -p DATABASE < FILENAME.sql

Thanks to ghacks.net for teaching me this.  They also have the sql for exporting a *.sql dump if you need that.