I have been running Kiwi TCMS as a Docker container, the version running is 9.0.1. Now I have seen the latest version 10.0, so like to update it. Not sure this will not break the existing data.
So, I have taken the database and uploads files backup by following it, https://kiwitcms.org/blog/atodorov/2018/07/30/how-to-backup-docker-volumes-for-kiwi-tcms/
But, how can I downgrade to an older version image, if the latest version does not work as expected or any problem comes? I found the docker tag concept and not sure how to apply it?
Can you confirm following will restore to an older version?
web: container_name: kiwi_web depends_on: - db restart: always image: kiwitcms/kiwi:9.0.1
Or how should I tag version 9.0.1, and then restore the tagged version, in case of reverting the latest upgrade?
But, how can I downgrade to an older version image, if the latest version does not work as expected or any problem comes? I found the docker tag concept and not sure how to apply it?
The easiest way would be to destroy the instance you were not happy with, start a new one (with v9.0.1) from scratch and restore the files/DB from your backup. I am assuming you made the backup before the upgrade.
image: kiwitcms/kiwi:9.0.1 works?
In theory that would work but in practice it won't because Kiwi TCMS upstream doesn't ship version tagged container images. See https://kiwitcms.org/#subscriptions, lines Only latest releases
vs. Versioned releases from kiwitcms/version
.
Or how should I tag version 9.0.1
Depending on what you've already done or not done this could either be possible or not possible:
docker images
and if you see something likekiwitcms/kiwi latest 9f23186803d5 8 weeks ago 736MB
kiwitcms/kiwi <no tag> <another image hash> ...
this means that latest
points to v10 while the untagged image is your previous image, 9.0.1 in your case. You can then use docker tag
command to tag it and make use of it inside docker-compose.yml
file.
kiwitcms/kiwi:latest
image this means you have removed the previous one from your system. You don't have access to it. Your options are:
kiwitcms/version
repository if it is critical to restore back to the old version.As a good practice you can follow these 2 advices:
Use the "restore-from-backup" technique or maybe "clone the docker image" so that you are upgrading and experimenting with a different Kiwi TCMS instance, not the main one that you use. If you are happy with the latest version then you can upgrade the main instance. Note here that by "clone the docker image" I mean make the running image/container files available on a different machine or possibly the same host machine but launch a secondary Kiwi TCMS instance + a secondary DB. ATM I'm not sure how exactly to do this but either docker
itself or other Linux tools should be able to help here.
docker tag
your local kiwitcms/kiwi
images when you download/deploy/upgrade them so that you can have a reference to the version at this point in time. This will avoid losing the older image.
Extra tip: with docker tag
you can also provide your own customized image names and possibly upload these images to your own docker repository for later access/backup or distributing them between multiple host systems.