Re: Postgresql data is not migrated after CF is upgraded from v197 to v230
Thank you for you explanation. I will try this process out. However I would suggest to take auto migration as consideration for next time upgrading any CF component.
From: Amit Gupta [mailto:agupta(a)pivotal.io]
Sent: 2016年4月19日 15:20
To: Discussions about Cloud Foundry projects and the system overall.
Subject: [cf-dev] Re: Postgresql data is not migrated after CF is upgraded from v197 to v230
First off, please be sure to backup your data in case anything goes wrong during an upgrade.
Also, do note that while private vendors of Cloud Foundry may support upgrades between several different versions of Cloud Foundry, the open source project currently only tests and guarantees upgrades between consecutive final releases.
You're correct, at minimum, you will first need to upgrade from v197 to some version between v211 (the first version which introduces the upgrade from postgres 9.0 to 9.4.2) and v225 (the last version including such an upgrade), and then upgrade to v230. I would review the release notes for releases that you're skipping to see if there are any other important releases that are actually not safe to skip.
I've updated the v226 release notes [1<https://github.com/cloudfoundry/cf-release/releases/tag/v226>] to call attention to this fact, thank you for highlighting this issue!
Please let me know if you have further questions about the upgrade process.
On Mon, Apr 18, 2016 at 11:22 PM, Meng, Xiangyi <xiangyi.meng(a)emc.com<mailto:xiangyi.meng(a)emc.com>> wrote:
I found all org, spaces and applications information were lost after I upgraded my CF env from v197 to v230. After checked the postgres node, I found there were two directory under /var/vcap/store. One is “postgres” and the other is “postgres-9.4.5”. I guess the reason why all information got lost is data from previous postgresql database(9.0.3) was not migrated to new postgresql database(9.4.5). I found two related releases.
Postgres Job Upgrade
The Postgres Job will upgrade the postgres database to version 9.4.2. Postgres will be unavailable during this upgrade.
In support of work in progress to enable developers to specify application ports when mapping routes, cf-release v229 introduces a database migration for CCDB. For deployments that use a PostgreSQL database for CCDB that is NOT the PostreSQL job that comes with cf-release, v229 introduces the following requirements. These requirements are applicable for subsequent releases. If you are using the PostgreSQL job that comes with cf-release, or if you are using MySQL as the backing db for CC, no action is necessary.
◦PostgreSQL 9.1 is required at a minimum
◦For versions 9.1-9.3, operators must first install the extension uuid-ossp
◦For versions 9.4 and newer, operators must first install the extension pgcrypto
So does it mean I have to upgrade v197 to v211 and then upgrade to v230 after installing pgcrypto? Any help would be appreciated.