shmoula
shmoula

Reputation: 1083

MySQL on Cloud foundry is emptied sometimes

I'd like to ask about database behavior on CloudFoundry service. I'm using Spring and vmc as my deploying command line helper. When I deploy an application and bind a service (in my case MySQL), user can add data to my service and those informations are stored in the database, which is ok. But after some time, when noone use my application (i'm talking about days), database is emptied. The same happens when I redeploy my application.

So my question is: database storage on CloudFoundry is not "persistent" (=forever), so should I search for some database hosting? Or how does this work?

Upvotes: 0

Views: 372

Answers (2)

eightyoctane
eightyoctane

Reputation: 639

You would need to create a mysqldump of your database. Once you have the mysqldump file, you then use caldecott and perform vmc tunnel to your MySQL service. After you have establish a connection with your MySQL service on Cloud Foundry, you then need to use the mysql command to manually import the mysqldump file into your service.

For how to use vmc tunnel, visit the documentation site here.

Upvotes: 0

dimcookies
dimcookies

Reputation: 1930

Normally that shouldn't happen. Ensure that when you redeploy your application you select the same service you had created the first time the application was uploaded otherwise a new service will be created for the application leading to an empty database

Upvotes: 1

Related Questions