| From: | Tom Lane <tgl(at)sss(dot)pgh(dot)pa(dot)us> |
|---|---|
| To: | "Rob Richardson" <Rob(dot)Richardson(at)rad-con(dot)com> |
| Cc: | pgsql-novice(at)postgresql(dot)org |
| Subject: | Re: Specify tables to be backed up |
| Date: | 2008-09-15 14:14:01 |
| Message-ID: | 25528.1221488041@sss.pgh.pa.us |
| Views: | Whole Thread | Raw Message | Download mbox | Resend email |
| Thread: | |
| Lists: | pgsql-novice |
"Rob Richardson" <Rob(dot)Richardson(at)rad-con(dot)com> writes:
> I'm thinking the only way of doing what I
> want to do is to have a batch file that contains a string of pg_dump
> calls, something along the lines of:
> pg_dump -t table1 MyDatabase > mydump.backup
> pg_dump -t table2 MyDatabase >> mydump.backup
> pg_dump -t -s big_table_I_only_want_the_schema_of MyDatabase >>
> mydump.backup
> Will that work? Is there a better way?
Recent versions of pg_dump have switches to exclude specific tables.
Consider
pg_dump --exclude-table=big_table ...
pg_dump -s -t big_table ...
regards, tom lane
| From | Date | Subject | |
|---|---|---|---|
| Next Message | Wright, George | 2008-09-18 15:09:31 | cpu utilization question |
| Previous Message | Rob Richardson | 2008-09-15 13:56:01 | Specify tables to be backed up |