Some questions about backup kiwi-tcms database

294 Views Asked by At

I try to backup my kiwi tcms data following steps on web http://kiwitcms.org/blog/atodorov/2018/07/30/how-to-backup-docker-volumes-for-kiwi-tcms/. Some question need help.

  1. Which type datas stored on kiwi_uploads? Shall I also use command "docker volume rm kiwi_uploads" then restore it? Did same as Backing up the database.

  2. Some errors occurs as below when restore kiwi_uploads using "cat uploads.tar | docker exec -i kiwi_web /bin/tar -x". But even error occurs, login and find previous data ok, such as plan, runs, test case...Of cause, I restore kiwi_db_data successfully.

    cat uploads.tar | docker exec -i kiwi_web /bin/tar -x /bin/tar: This does not look like a tar archive /bin/tar: Skipping to next header /bin/tar: Exiting with failure status due to previous errors

3."cat database.json | docker exec -i kiwi_web /Kiwi/manage.py loaddata --format json -". No any parameter behind last -? missing or just as this.

1

There are 1 best solutions below

6
On BEST ANSWER

1) kiwi_uploads is for all files that are uploaded (or attached) to documents like Test Plan, Test Case, etc.

The instructions in the blog should work for you. Usually there's no need to remove the volume but if you are restoring everything it doesn't really matter.

2) For the errors you have /bin/tar: This does not look like a tar archive

so whatever file you ended up with is not a tar archive and everything else fails.

3) The last - means to read the input data from stdin. You have to copy the backup and restore commands verbatim.

All commands are designed to be executed from a Linux host. I don't have access to a Windows or Mac OS box so I don't know if they will work there at all.