memos
memos copied to clipboard
Backup / export db
Is your feature request related to a problem?
When I updated memos to latest 0.8, container won't start... I have to delete db file to start container, but obviously all my data was gone...
Would it be possible to export database for backup purpose ?
Thanks
Describe the solution you'd like
Database export or backup file
Additional context
No response
All your data is stored in file memo_prod.db.
You can use any tools to backup this file (i.e., your data).
All your data is stored in file
memo_prod.db.You can use any tools to backup this file (i.e., your data).
I know but something was broken when I updated memos so, even with the db file, I was forced to delete it for restart container... If a backup mechanism was added, maybe these issue would be resolved...?
I can't understand, what do you mean "backup" here?
In fact, the db file is a backup file, isn't it?
If you failed to update memos version, there should be a backup db file in the same folder with origin db.
You can still start memos with it in previous version.
@Fabeuss Can you describe how you updated it and what the error message was?
Maybe related to this? I had the same problem.

Maybe related to this? I had the same problem.
Exactely, that was my issue, thanks for screenshot 👍
@Fabeuss Can you describe how you updated it and what the error message was?
I updated container via portainer "recreate" and pull latest version. When portainer has recreated memos, the error was "cannot open db". I was forced to delete db to restart the container.
In your docker compose stack, change the tag to 0.8.0 like so and it should work. I had the same issue and it was due to using the "latest" tag.
version: "3.0"
services:
memos:
image: neosmemo/memos:0.8.0
container_name: memos
volumes:
- /docker/memos/:/var/opt/memos
ports:
- 5230:5230
@Fabeuss Thanks! I'll take a deep look into the related code. Maybe you can check if there is a backup file.
I had the same issue and it was due to using the "latest" tag.
Do you know any detailed reason?
I had the same issue and it was due to using the "latest" tag.
Do you know any detailed reason?
This is most likely due to people using Portainer and pasting the docker-compose into the stacks section. This can be fixed by backing up your db file, removing the current (older) memos image then recreating the stack to pull the latest image. Most people don't think about doing all of that in Portainer though so they get stuck with this error. Instead, they just click "deploy stack" and it doesn't pull the latest image.
I had the same issue and it was due to using the "latest" tag.
Do you know any detailed reason?
This is most likely due to people using Portainer and pasting the docker-compose into the stacks section. This can be fixed by backing up your db file, removing the current (older) memos image then recreating the stack to pull the latest image. Most people don't think about doing all of that in Portainer though so they get stuck with this error. Instead, they just click "deploy stack" and it doesn't pull the latest image.
Weird, I've got many containers and recreating them via portainer never failed until with memos. But thanks for your notice, will try for next update
My database was perfectly backed up but I run into the same issue the new memo version can't read the old databases. There is something wrong with the latest image 0.8.0
@mariushosting @Fabeuss @p-jones If you got the issue of no such table: migration_history, please run these SQL manually into your database file. (Backup first if possible)
https://github.com/usememos/memos/blob/main/store/db/migration/prod/0.8/