Advertisement

06.09.2008 at 03:19AM PDT, ID: 23468485
[x]
Attachment Details

Backup Postgres DB Structure

Asked by ruanlab123 in PostgreSQL Database

Hi

Is it possible to backup the structure of a Postgres Database, I normally use the pgdump command for a backup but then the structure and the data is backup.  I want to replicate the DB but with no data, a completely clean DB.  The only way that I can think of is to restore the backup file and then write a sql script that will delete all the data, but with a DB of 220+ tables, certainly there must be a faster way.

ThanksStart Free Trial
[+][-]06.10.2008 at 08:51AM PDT, ID: 21752382

At Experts Exchange, members can ask their questions to thousands of technology professionals, also known as Experts. Experts compete and collaborate to answer those questions by leaving comments like this one.

Start your 7-day free trial to view this Expert Comment or ask the Experts your question.

 
[+][-]06.24.2008 at 03:30PM PDT, ID: 21861125

View this solution now by starting your 7-day free trial. Setting up your free trial is quick, easy, and secure. We will return you to this solution, unlocked, when you're done.

 

About this solution

Zone: PostgreSQL Database
Sign Up Now!
Solution Provided By: drazen_nikolic
Participating Experts: 2
Solution Grade: A
 
 
 
Loading Advertisement...
20080716-EE-VQP-32 / EE_QW_2_20070628