data is missing when I upgrade the docker image
Describe the bug
Hi, I'm not sure what's wrong I'm doing here. I upgraded my docker image of memos, using the old data. when I finished the upgrade, all the memos are missing.
Steps to reproduce
just upgrade the docker image.
The version of Memos you're using
latest stable
Screenshots or additional context
No response
Backup your database file so that your data is never lost.
And please provide more context or logs.
Did you create a volume within your docker setup for your data? Otherwise it's not persistent, as the docker manual states:
By default all files created inside a container are stored on a writable container layer. This means that:
- The data doesn't persist when that container no longer exists, and it can be difficult to get the data out of the container if another process needs it.
I've designated the file path for the persistent files. it just didn't work.
How do you deploy the memos container? If you do it like stated in the memos docs, your data should be persistent. As usual with docker, there are two ways: docker run and docker-compose.
docker run
docker run -d \
--init \
--name memos \
--publish 5230:5230 \
--volume ~/.memos/:/var/opt/memos \
neosmemo/memos:stable
docker-compose
services:
memos:
image: neosmemo/memos:stable
container_name: memos
volumes:
- ~/.memos/:/var/opt/memos
ports:
- 5230:5230
I used the first one. it's wired that the data are missing. But when I use the old version of image, the data are back. I'm thinking maybe there are some incompatible things happened here.