This is what works reliably for me.
1. Do a dump of your existing DB (i.e. connect to your running instance of the testlink container -
Code: Select all
docker exec -it <testlink container> bash
Code: Select all
mysqldump -u root -h mariadb bitnami_testlink > backup.sql
2. Get the backup.sql and copy it outside of the container
Code: Select all
docker cp <container name>:<path>backup.sql .
3. Rather than try to backup the current containers, I just left them where they are and started a fresh instance of the new version from a different path. I created a directory called testlink1917 and launched edited my docker-compose.yml to pull the newer testlink container. In my case, I gave up on bind mounts and just switched to docker volumes.
4. After the new instance was up and running the following was critical for migration success: DELETE AND RECREATE THE DEFAULT DATABASE BEFORE RESTORING THE OLD DATA. I'm not a DB person and I had no idea that restoring the backup didn't overwrite everything. From inside the *new* testlink container:
Code: Select all
mysql -u root -h mariadb
Code: Select all
drop database bitnami_testlink;
Code: Select all
create database bitnami_testlink;
Code: Select all
exit
Code: Select all
mysql -u root -h mariadb bitnami_testlink < backup.sql
Code: Select all
/opt/bitnami/testlink_install/sql/alter_tables/<newTLversion>/mysql