Gerar e restaurar backup de apenas uma tabela Postgres

Posted Over 9 years ago. Visible to the public.

Gerar backup
pg_dump --host localhost --port 5432 --username "postgres" --format custom --verbose --file "/home/backup_tabela.backup" --table "NOME_SCHEMA.NOME_TABELA" "NOME_BASE"

Restaurar:
pg_restore --host localhost --port 5432 --username "postgres" --dbname "NOME_BASE" --data-only --jobs 4 --table NOME_TABELA --schema public --verbose "/home/backup_tabela.backup"

João Paulo
Posted by João Paulo to ZeroGlosa (2014-08-25 12:04)