Backup version constraints - need to be exact same version?

Trying to load a backup from a slightly older version to a slightly newer version and it’s failing. I couldn’t find anything regarding versioning in the docs, do I need to downgrade my current version in order to load the backup?

[2018-09-05 07:59:47]   Current version: 20180521191418
[2018-09-05 07:59:47]   Restored version: 20180504000531
[2018-09-05 07:59:47] Extracting dump file...
[2018-09-05 07:59:48] Cannot restore into different schema, restoring in-place
[2018-09-05 07:59:48] Enabling readonly mode...
[2018-09-05 07:59:48] Pausing sidekiq...
[2018-09-05 07:59:48] Waiting for sidekiq to finish running jobs...
[2018-09-05 07:59:48] EXCEPTION: ERROR:  permission denied for database discourse
CONTEXT:  SQL statement "CREATE SCHEMA IF NOT EXISTS backup"
PL/pgSQL function inline_code_block line 6 at SQL statement

You can get this error if the postgres user you using is not an admin user does not have permission to create schemas in postgres, you can safely comment out the create schema line at the top of the file if the schema already exists

2 Likes