I am using Proxmox server and docker to selfhost n8n server.
Sometime I need to restart server and everything is ok, but last week, when i reboot the server, A half of data (workflow and execution) is lost, all data from Thurday 25/9 to Sunday 28/9 is lost
I have trace the sqlite db file and see data in these days is missing and I can’t rollback it.
I have read this topic but seem cannot trace bug, have anyone suggest idea to trace and fix in the future
Hello DragonPow, what you’re seeing is almost always a storage/volume config issue, not n8n “losing“ data.
When n8n is run in Docker with SQLite or Postgres, data is only safe if the database files are on a persistent volume. If the container writes to its own ephemeral FS and you reboot/replace it, any writes after the last persistence point are gone.
Maybe there are several solution that i can suggest you:
You can check you docker-compose.yml or docker run env:
environment:
- DB_TYPE=postgresdb # or sqlite if you use it
- DB_POSTGRESDB_HOST=postgres
- DB_POSTGRESDB_DATABASE=n8n
- DB_POSTGRESDB_USER=n8n
- DB_POSTGRESDB_PASSWORD=xxxx
if you dont tsee DB_TYPE=postgresdb, you’re still on SQLite
Create a test workflow, restart, and then check its still there. Check the actual Postgres container has your tables populated (workflows_entity, execution_entity).
If you using Postgres, set up pg_dump or volume-level backups.
Maybe thats all i can suggest you, hope this will be works