Step to do when to fully backup and restore the answer.dev?
Including images, configuration files, etc.
Step to do when to fully backup and restore the answer.dev?
Including images, configuration files, etc.
If you use docker for deployment, then all the data is stored in the volume.
For example, your startup command is: docker run -d -p 9080:80 -v answer-data:/data --name answer answerdev/answer:latest then answer-data is that needs to be backed up.
If you are using a binary deployment, then you need to back up the data directory that you specified when you started.
For example, your startup command is: ./answer run -C ./answer-data/
The directory you need to back up is ./answer-data/
Additionally you need to back up the database you are using.
First, you need to pay attention to the version of the database you are importing and exporting. For example, if you are exporting data in v1.0.9 version, then the data structure of the database is the data structure of v1.0.9 version. It cannot be imported into v1.1.0 due to the change in the data structure of v1.1.0. Similarly the data exported from v1.1.0 cannot be imported into v1.0.9 version of answer, also because the database structure has changed.
Then, according to your logs, it looks like this log does not occur during the import and export process. It is more likely that it is due to a version upgrade, and I suggest trying to fix it using the following
docker pull answerdev/answer:latestdocker exec -it answer bash answer is your container name.answer upgrade -f v1.0.9i got this error when import the database
...
2023-06-15 07:09:09.349 ERROR /go/src/github.com/answerdev/answer/answer_build3810709146/vendor/github.com/answerdev/answer/internal/base/handler/handler.go:36 code: 500, reason: base.database_error, message: , error: Error 1054: Unknown column 'invite_user_id' in 'field list'
...