HELP to restore my database (users, points, settings)

Hi,

I was until today on version 1.18.1 and today I updated to 1.20.1 .

I don’t know what happened but after restarting the Docker stack with the updated compose file I had lost my user.

So I tried restoring my DB – I had to first truncate the ‘users’ table otherwise I could not restore, probably because of the way I had created my dump – but each time I started the stack my user in the db would be wiped out and the only user left in the db would be the demo user… :face_with_raised_eyebrow:

I also tried to go back to the image of version 1.18.1. With that image and a db restore, I was able to log in, so my user survived the db start, yet all my other data (points, settings) was still gone.

Could someone help me restore my system?
Thank you very much in advance.

How my dump was created:
pg_dump -U postgres dawarich_development | gzip > dawarich-db_dump.sql.gz

I think a found a solution.

while still on rolled back 1.18.1 image, I not only ‘truncated’ the ‘users’ table but I had to delete all the db’s tables. Only then was I able to do a proper restoring.

These are the commands I used to delete everything in the dawarich_development db:

First: docker compose exec -i dawarich_db psql -U postgres dawarich_development

Then:

DROP SCHEMA public CASCADE;
CREATE SCHEMA public;
GRANT ALL ON SCHEMA public TO postgres;
GRANT ALL ON SCHEMA public TO public;
COMMENT ON SCHEMA public IS ‘standard public schema’;
CREATE EXTENSION postgis;

After that, I changed again the image for 1.20.1 and then it worked.

So, maybe all this was because when I first updated to 1.18.1 I was still using the separate sidekick container and that it did not upgrade properly.