I’m using Baserow 1.33.4, self-hosted, Docker single-image. I can confirm that the problem persists also in Baserow 1.34.2.
I have to report that the DB restore script doesn’t work under some circumstances. To be specific, in my case some of the batches to be restored contained CREATE SEQUENCE commands that led to relation "..." already exists errors which in turn made the restore script abort execution. However, these “errors” were not really a problem. When manually running the respecive pg_restore commands, the backup could indeed be restored. Here are the details:
I created a DB backup with the following command:
docker compose run -it --remove-orphans baserow backend-cmd-with-db backup [...]
I then started the restore script. I made sure that it started with an empty data directory, which means that the database was initialized as “fresh” (I could confirm that this worked and the created database “baserow” was empty).
docker compose run -it --remove-orphans baserow backend-cmd-with-db restore -f <PATH_TO_BACKUP>
The first batches were OK, then the script stopped with the following output:
pg_restore --host=localhost --dbname=baserow --port=5432 --username=baserow -Fd --jobs=1 -w /dev/shm/[REDACTED]/user_tables_batch_28
pg_restore: error: could not execute query: ERROR: relation "field_47452_seq" already exists
Command was: CREATE SEQUENCE public.field_47452_seq
START WITH 1
INCREMENT BY 1
NO MINVALUE
NO MAXVALUE
CACHE 1;
[POSTGRES][2025-07-18 06:40:54] 2025-07-18 06:40:25.590 UTC [300] LOG: checkpoint starting: wal
[POSTGRES][2025-07-18 06:40:54] 2025-07-18 06:40:54.913 UTC [411] baserow@baserow ERROR: relation "field_47452_seq" already exists
[POSTGRES][2025-07-18 06:40:54] 2025-07-18 06:40:54.913 UTC [411] baserow@baserow STATEMENT: CREATE SEQUENCE public.field_47452_seq
[POSTGRES][2025-07-18 06:40:54] START WITH 1
[POSTGRES][2025-07-18 06:40:54] INCREMENT BY 1
[POSTGRES][2025-07-18 06:40:54] NO MINVALUE
[POSTGRES][2025-07-18 06:40:54] NO MAXVALUE
[POSTGRES][2025-07-18 06:40:54] CACHE 1;
[POSTGRES][2025-07-18 06:40:54]
[POSTGRES][2025-07-18 06:40:54]
pg_restore: warning: errors ignored on restore: 1
CommandError: The back-up failed because of the failure of the following sub-command, please read the output of the failed command above to see what went wrong.
The sub-command which failed was:
pg_restore --host=localhost --dbname=baserow --port=5432 --username=baserow -Fd --jobs=1 -w /dev/shm/tmp5d1js537/[REDACTED]/user_tables_batch_28
It failed with a return code of: 1
After I trying out different things, I settled with the following:
- extracted the backup archive gz file manually
- again started a container with a completely “fresh” database (no tables in it) and mounted the directory with the extracted backup files
- manually executed the pg_restore commands one by one, i.e.
pg_restore --host=localhost --dbname=baserow --port=5432 --username=baserow -Fd --jobs=1 -w <PATH_TO_EXTRACTED_BACKUP>/user_tables_batch_0
pg_restore --host=localhost --dbname=baserow --port=5432 --username=baserow -Fd --jobs=1 -w <PATH_TO_EXTRACTED_BACKUP>/user_tables_batch_1
...
- for some batches, pg_restore again complained about
CREATE SEQUENCE public.field_, but it always ended with anpg_restore: warning: errors ignored on restore: ...with 1 to 3 ignored errors – which to me signalled that the errors could indeed be ignored
After that, it looked like the backup was successfully restored. Logs looked fine and the UI worked.