1

I am using pgadmin v4.22 to backup and restore a database. This works fine the first time, but when I want to restore it again to a backup with deleting the old data, pgAdmin seems to ignore the Clean before restore setting. I end up with multiple identical entries.

This is what I am doing: Right click on the database, and click on Restore...

Then I select myBackup.backup and set Role name to postgres.

In the Restore options tab I activate:

Sections: Data
Queries: Clean before restore

When clicking on restore, it succeeds in about 1.5 seconds for a 9 MB backup. This is the log:

pg_restore: connecting to database for restore
pg_restore: implied data-only restore
pg_restore: processing data for table "public.myTable"
pg_restore: executing SEQUENCE SET some_number_seq

It does not mention any clean step. When I query the database I have identical entries now.

0

Browse other questions tagged or ask your own question.