skip to Main Content

We are planning to migrate our database from v11 to v15. We have configured WAL backup. Can we use these files to restore database on v15 PostgreSQL or must we do dump/restore?

2

Answers


  1. No, a file system level backup (pg_basebackup or similar) can only be restored on the same version and operating system as the original.

    Your alternatives are pg_dumpall/restore, pg_upgrade or logical replication.

    Login or Signup to reply.
  2. You will restore what you backed up. If your backup is of v11, you will get v11 restored, and then need to upgrade it again.

    There is a ticklish situation between the pg_upgrade and the first pg_basebackup taken on v15. You might have all the WAL files, but you won’t have a base backup (of the correct version) on which to apply them. So you need to take a new base backup right after the pg_upgrade, and that should be included as part of the downtime planning.

    Login or Signup to reply.
Please signup or login to give your own answer.
Back To Top
Search