Skip to content

[NEON][BACKUP] Creating a dump of a Postgres db does not delete existing tables #319

Description

@zaeema-n

Add the --clean command when taking a dump of the postgres database.

When you run pg_dump with --clean, the dump file will include DROP statements before each object (TABLE, SEQUENCE, VIEW, etc.).

If you restore a dump with --clean, you don’t need to manually drop tables first.

Restores become idempotent — safe to run even if the DB already has some objects.

Metadata

Metadata

Labels

No labels
No labels

Type

No type

Projects

No projects

Milestone

No milestone

Relationships

None yet

Development

No branches or pull requests

Issue actions