Thread: selective backup and restore
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)?
I'm using Windows Xp and Windows Server 2003.
Thanks in advance.
Luca.
----
Email.it, the professional e-mail, gratis per te: clicca qui
Sponsor:
Polizze per vacanze e settimane bianche. Acquista online!
Clicca qui
Hi, luca.ciciriello@email.it 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