'How to upload a database on Kiwi TCMS from json file?
I have kiwi TCMS on docker through docker-compose.yml. And i have file json with database (old version of kiwi) To dump database from old serwer i use:
docker exec -it kiwi_web /Kiwi/manage.py dumpdata --all --indent 2 > database.json
.
In new kiwi TCMS i want use my old database, but after enter this command
docker exec -it kiwi_web /bin/bash -c '/Kiwi/manage.py sqlflush | /Kiwi/manage.py dbshell'
i get:
CommandError: You appear not to have the 'mysql' program installed or on your path.
Exception ignored in: <_io.TextIOWrapper name='<stdout>' mode='w' encoding='UTF-8'>
BrokenPipeError: [Errno 32] Broken pipe
What should I do? I use instructions from: kiwi blog
Solution 1:[1]
mysql
is indeed missing inside the web docker image (this is a side effect from the build process, before this binary was included in the image).
You can work around by docker exec -u 0 -it kiwi_web /bin/bash
-> this will give you root privileges inside the container. Once you are inside "yum install mariadb" or "yum install mysql".
Without stopping the container try removing all data from all tables and restoring the json data.
Sources
This article follows the attribution requirements of Stack Overflow and is licensed under CC BY-SA 3.0.
Source: Stack Overflow
Solution | Source |
---|---|
Solution 1 | Alexander Todorov |