Hi.

Here are the options for pg_dump:
  -a         dump out only the data, no schema
  -c         clean (drop) schema prior to create
  -d         dump data as INSERT, rather than COPY, commands
  -D         dump data as INSERT commands with attribute names
  -h <hostname>   server host name
  -i         proceed when database version != pg_dump version
  -n         suppress most quotes around identifiers
  -N         enable most quotes around identifiers
  -o         dump object ids (oids)
  -p <port>  server port number
  -s         dump out only the schema, no data
  -t <table> dump for this table only
  -u         use password authentication
  -v         verbose
  -x         do not dump ACL's (grant/revoke)

So you are dumping it with the following:
Proper INSERT commands/attribs, pwd auth, data only

I would consider running:
pg_dump -D -u -c -f backup.dump
This will dump the schema and drop the objects before creating them.

-Michael

> 4) I run pg_dump this way: "pg_dump -D -u -a -f backup.dump
> main_v0_6" in order to create a backup of my "main_v0_6" database.
>  In order to regenerate the database, I first run a "\i
> create_tables.sql" script, then I run "\i backup.dump".  However,
> I end up having to hand edit the "backup.dump" file to place "drop
> sequence" statements before the "create sequence" statements
> because they are created by my "create_tables.sql" script.  I'm
> sure you Postgres gurus out there are not doing it this way, what
> is your method of database backup/recovery?

_________________________________________________________________
     http://fastmail.ca/ - Fast Free Web Email for Canadians

Reply via email to