HiveBrain v1.2.0
Get Started
← Back to all entries
snippetsqlMinor

How to exclude tables when using pg_dumpall with postgresql?

Submitted by: @import:stackexchange-dba··
0
Viewed 0 times
postgresqltableshowwithpg_dumpallusingwhenexclude

Problem

If use pg_dump, it has a --exclude-table-data option to ignore special table.

But pg_dumpall command doesn't has that option. So how to exclude several tables when dump all databases?

Solution

The name pg_dumpall itself says “dump all”, which means you can't exclude anything. There is no such pg_cumpall option available.

Use pg_dump instead.

Context

StackExchange Database Administrators Q#167424, answer score: 5

Revisions (0)

No revisions yet.