How to migrate only postgres data using EBS volumes

0

Our application stores metadata in postgres database. We are using AWS ebs volumes for postgres data for persistent storage. We attach and detach this EBS volumes to AWS instance when needed. AWS instance is destroyed when not needed and will create new one when needed. EBS volume will be attached when new instance is created. The problem is, when ebs volume is detached postgres version is 9.x. While attaching EBS volume to new instance, postgres version in the new instance is 11.x. How to migrate the postgres data from 9.x to 11.x in the ebs volumes where new instance has 11.x version postgres version installed.

2개 답변
1

Hello,

I assume this is a self-managed postgres database? You'll need to upgrade the database from v9 to v11, you cannot just use the database files created in one version from another db engine version.

You can refer to this documentation for instructions for example: https://www.postgresql.org/docs/11/pgupgrade.html

Regards

AWS
답변함 2년 전
0

First attach to v9 , upgarde the db to v11 and from this point you have the data on EBS ready for another detach-attach as v11

ArikY
답변함 2년 전

로그인하지 않았습니다. 로그인해야 답변을 게시할 수 있습니다.

좋은 답변은 질문에 명확하게 답하고 건설적인 피드백을 제공하며 질문자의 전문적인 성장을 장려합니다.

질문 답변하기에 대한 가이드라인