0

Just as the title states, I have a table that has well over 25 million records and I need all those records. it will only grow over time, so I need to export this one table from a psql database and import it into another psql database which is used for development.

Ideas?

I know you can dump a whole database, but can you dump a table? (sorry if thats a dumb question)

TheWebs
  • 12,470
  • 30
  • 107
  • 211
  • Possible duplicate of [How to create a backup of a single table in a postgres database?](http://stackoverflow.com/questions/3682866/how-to-create-a-backup-of-a-single-table-in-a-postgres-database) – gpoo Feb 01 '16 at 20:14

1 Answers1

0

You can use:

$ pg_dump -d db -t big_table > big_table.sql
gpoo
  • 8,408
  • 3
  • 38
  • 53