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?
- Restore the DB files and uploaded files that already taken backup.
- Change the image in docker-compose file to an older one? Like my case, I could want to pull the version 9.0.1 image, so changing the image: kiwitcms/kiwi:9.0.1 works?
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?
 
                        
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.
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 releasesvs.Versioned releases from kiwitcms/version.Depending on what you've already done or not done this could either be possible or not possible:
docker imagesand if you see something likethis means that
latestpoints to v10 while the untagged image is your previous image, 9.0.1 in your case. You can then usedocker tagcommand to tag it and make use of it insidedocker-compose.ymlfile.kiwitcms/kiwi:latestimage this means you have removed the previous one from your system. You don't have access to it. Your options are:kiwitcms/versionrepository 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
dockeritself or other Linux tools should be able to help here.docker tagyour localkiwitcms/kiwiimages 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 tagyou 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.