Ver Mensaje Individual
  #2 (permalink)  
Antiguo 18/05/2010, 10:30
Avatar de razpeitia
razpeitia
Moderador
 
Fecha de Ingreso: marzo-2005
Ubicación: Monterrey, México
Mensajes: 7.321
Antigüedad: 19 años, 1 mes
Puntos: 1360
Respuesta: Exports y restores automáticos para tablas de BD

Bueno no se que modulo estés usando para conectarte a la base de datos, pero leyendo un poco la documentación de la función pg_dump, me encontre con que tiene el parametro -t para seleccionar solo ciertas tablas.

Cita:
-t table
--table=table
Dump data for table only. It is possible for there to be multiple tables with the same name in different schemas; if that is the case, all matching tables will be dumped. Specify both --schema and --table to select just one table.

Note: In this mode, pg_dump makes no attempt to dump any other database objects that the selected table may depend upon. Therefore, there is no guarantee that the results of a single-table dump can be successfully restored by themselves into a clean database.