Search Postgresql Archives

Question about backing up partial Database

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

 



Hi,

Can pg_dump be used to backup a selected number of tables, (rather than All or One)?

We have a case where we need to backup tables of the form sale_2001xx, or sale_2002xx, etc.

Our current solution is the following:

  pg_dump -d dbname -t sale_200101 >  sales_2001_dump
  pg_dump -d dbname -t sale_200102 >>  sales_2001_dump
  pg_dump -d dbname -t sale_200103 >>  sales_2001_dump
  ..
  pg_dump -d dbname -t sale_200152 >>  sales_2001_dump
 gzip sale_2001_dump

However this requires more diskspace and more db connection over head than:

  pg_dump -d dbname | gzip sales_2001_dump.gz

Currently all the tables are in the public namespace. We've had trouble in the past for our perl program to work with multiple schema names.

Thank you for your help any suggestions.
Sincerely,
David Link
White Plains, NY






---------------------------(end of broadcast)---------------------------
TIP 5: Have you checked our extensive FAQ?

              http://www.postgresql.org/docs/faq

[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