sabre-io / Baikal

Baïkal is a Calendar+Contacts server
https://sabre.io/baikal/
GNU General Public License v3.0
2.42k stars 281 forks source link

How to move database and import into never release of baikal #1240

Closed juppyjupp closed 3 months ago

juppyjupp commented 4 months ago

Baikal version: 0.5.3 and 0.8.0

Problem: HI,

hope you can help me on finding a strategy how to move the database to another host having a never version running.

I am running Baikal on a raspberry pi 1B for a long time without any big issues, now it is time to move to a never 3b version. My running installation has version 0.5.3. On the new Raspi i've already installed 0.8.0

Notice: i already changed the configuration to use "http://example.org/baikal/html/dav.php" in my old environmet

Now my intention is to move DB and upgrade in one step. Idea is to copy the "Specific" folder (with the DB) from old to new environment. But as far as i know on first startup (opening admin UI) after upgrading the DB will be checked and if necessary converted to run with the new release. In my case i already did the first step on the new Raspi for some testing purpose, so there will be no check and convert of the database anymore (i assume) Does it work to simply delete baikal folder on new host, re-install again, then copy over "Specific" folder and then go for first acces to admin ui.

Or do you have any other recommendation how to proceed.

in advance thanks for you support

Jupp

ByteHamster commented 4 months ago

A lot has changed since version 0.5.3. Most importantly, the config file format. See "releases" page on GitHub. I think doing upgrade and migration in two separate steps would be easier. Also: Make a backup!

juppyjupp commented 4 months ago

Hi ByteHamster,

thanks for your swift response. The issue is, the old environment is running on an quit old Raspi OS, running quit old PHP 5.6. To upgrade further in this environment, i need to upgrade PHP first but this is not available for this OS Release Release notes says PHP 5.x is removed with 0.6.0 New environment is running PHP 7.3 which is required from 0.6.0 onwards The PHP dependencies drive to the approach to move DB to new environment and the start with at least 0.6.0

I give it a try by completely deleting baikal folder in new environment, download and unpack 0.6.1 version and then copy "Specific" folder from old environment to 0.6.1 installation in new environment. -> it worked Then in a second step i made a backup of 0.6.1 and upgraded from 0.6.1 to 0.7.2 and copied again Specific folder from 0.6.1. backup to 0.7.2 installation. For shure, with the 0.7.2 i need to do some post-installation steps because of the new YAML based configuration. It also seems to work. I have to do some smoke tests and if successfull next step ist to upgrade to 0.8.0 and then maybe to the latest. With the next upgrade i have to keep in mind not only restoring "Specifc" but also "config" folder from previous version (right?)

Keep you informed.

Jupp