Search Postgresql Archives

Re: selective backup and restore

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



Hi,

luca.ciciriello@xxxxxxxx wrote:
Hi All.
Is it possible in postgreSQL 8.2.4, using pg_dump.exe, make a backup/restore conditioned to the key of some tables (respecting
existing constraints)?

You can either use the -t option or
with a full backup in custom format
you can pick a few objects (tables, views, ...)
by creating the list with pg_restore -l and
edit it in a text editor and then use -L
to extract the DDL/DML for these objects.

See:

http://www.postgresql.org/docs/8.3/static/app-pgdump.html

-t table
--table=table

for pg_dump
and

http://www.postgresql.org/docs/8.3/static/app-pgrestore.html

-F format
--format=format (use t or c)

and

-l
--list

List the contents of the archive. The output of this operation can be used with the -L option to restrict and reorder the items that are restored.
-L list-file
--use-list=list-file

Restore elements in list-file only, and in the order they appear in the file. Lines can be moved and can also be commented out by placing a ; at the start of the line. (See below for examples.)


Regards
Tino

---------------------------(end of broadcast)---------------------------
TIP 6: explain analyze is your friend

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
[Index of Archives]     [Postgresql Jobs]     [Postgresql Admin]     [Postgresql Performance]     [Linux Clusters]     [PHP Home]     [PHP on Windows]     [Kernel Newbies]     [PHP Classes]     [PHP Books]     [PHP Databases]     [Postgresql & PHP]     [Yosemite]
  Powered by Linux