How to exclude tables when using pg_dumpall with postgresql?
The name pg_dumpall itself says &ldquo;dump all&rdquo;, which means you can't exclude anything. There is no such pg_cumpall option available.

Use pg_dump instead.