Title
#eclecticiq-polylogyx-extension
e

Eugene

03/24/2021, 9:32 AM
Hi team! We make backups of the "polylogyx" postgresql db with command:
pg_dump -U polylogyx polylogyx > 03_24_dump.dmp
and restore:
psql -U polylogyx polylogyx < 03_24_dump.dmp
As a result we can observe many errors:
9:32 AM
Is this normal behavior?
9:33 AM
Or could you recommend the best way of db backups?
k

Kishore Arava

03/24/2021, 12:55 PM
Hi @Eugene, The way you are trying to export and import db dumps is exactly correct. As part of ESP compose, we populate some default data into ESP. So when you are trying to import the db backup, it is trying to add the relations, indexes and etc., again to the same db where those are already present. So resulting errors
e

Eugene

03/24/2021, 12:58 PM
Ok, thx
k

Kishore Arava

03/24/2021, 12:58 PM
If you want to import the db into a fresh server( or a server where you don't have an important db), we recommend dropping the postgres docker volume and recreating the postgres docker container(But not along with plgx-esp docker service, as plgx-esp service creates relations again).
12:59 PM
So the empty postgres db with just polylogyx user allows you to import the db backup you are having.