fred4jupiter/fredbet

change spring.profiles.active during runtime

Closed this issue · 2 comments

YoSev commented

Hello,

we are using fredbet quite heavily but we began in dev mode - now we are afraid, that a restart of the host etc. will make us loose all data.

Is it possible to backup/restore the h2 database from time to time or change to production on the fly?

thanks

Hi, the H2 database is for development only. And the dev profile also. In production you have to use a production-grade database, e.g. PostgreSQL, MySQL or the like.
In the runtime configuration there is a menu entry about backing up the h2 database. But this is more experimental.
The dev profile runs in memory only. After restart all data will be lost. But this is intented.
The active profiles will be determined at startup. Therefore the profile cannot be changed at runtime.

YoSev commented

Hi,

i expected that answer - thanks a lot!
And sorry for abusing the issue board.

Cheers,
John