Reputation: 25207
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?
Upvotes: 0
Views: 350
Reputation: 44305
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.
Upvotes: 1
Reputation: 247270
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.
Upvotes: 2