From: Michael Richards <michael@fastmail.ca>
To: pgsql-sql@postgresql.org
Cc: jlapham@gandalf.bioqmed.ufrj.br
Subject: Re: on line numbers, drop table errors, and log files
Date: Tue, 1 Aug 2000 14:32:27 -0400 (EDT)
Message-ID: <398717BB.00003D.01145@frodo.searchcanada.ca> (raw)
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 instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Reply to all the recipients from your mail client; the link fills in
the headers below: reply via email
Some clients, webmail especially, drop In-Reply-To and References from
a link, and the reply then starts a new thread: use the mbox below.
To: pgsql-sql@postgresql.org
Cc: michael@fastmail.ca, jlapham@gandalf.bioqmed.ufrj.br
Subject: Re: on line numbers, drop table errors, and log files
In-Reply-To: <398717BB.00003D.01145@frodo.searchcanada.ca>
References: <398717BB.00003D.01145@frodo.searchcanada.ca>
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
This inbox is served by DDX for PostgreSQL; see mirroring instructions
for how to clone and mirror all data and code used for this inbox