URGENT - Lost 1 weeks work on docker restart

  • n8n version: 0.236
  • Database (default: SQLite): default
  • n8n EXECUTIONS_PROCESS setting (default: own, main): main
  • Running n8n via (Docker, npm, n8n cloud, desktop app): docker
  • Operating system: ubuntu

Hello,

I restarted my docker image and all new workflows have vanished?

the new ones are not there, and some modified ones reverted back to some weeks ago?

What can i do?

Thanks

It looks like your topic is missing some important information. Could you provide the following if applicable.

  • n8n version:
  • Database (default: SQLite):
  • n8n EXECUTIONS_PROCESS setting (default: own, main):
  • Running n8n via (Docker, npm, n8n cloud, desktop app):
  • Operating system:

Hey @xewonder,

That would normally mean the data volume has changed or was not set correctly. Which command are you using to run n8n and if you are using ~/.n8n/ for the volume did you make sure you ran the command as the same user in Ubuntu as using root would result in ~/.n8n/ being /root/.n8n but if you used a user called xewonder the same path would be something like /home/xewonder/.n8n.

Hi,

I’m quite sure that i always log on as root.

docker run -t -d --restart unless-stopped -it -p 5678:5678 -e EXECUTIONS_PROCESS=main -e EXECUTIONS_DATA_PRUNE=true -e EXECUTIONS_DATA_MAX_AGE=30 -e N8N_PROTOCOL=‘https’ -e N8N_HOST=‘workflow.xxx.com’ -e WEBHOOK_URL=‘https://workflow.xxx.com’ -e N8N_EMAIL_MODE=‘smtp’ -e N8N_SMTP_HOST=‘smtp.gmail.com’ -e N8N_SMTP_PORT=465 -e N8N_SMTP_USER=‘[email protected]’ -e N8N_SMTP_PASS=‘xxx’ -v ~/.n8n:/home/node/.n8n n8nio/n8n

is there any way of getting them back?

EDIT**
I reverted back to a server image from 2 days ago and the problem is the same!

Hey @xewonder,

It looks like the volume is there and is set to using the logged in users home path, If you are always using root they should still be there sadly if they are not there there is not really anything we can do as they will be kept in the database but I would have expected the restore to bring them back.

It might be worth double checking you don’t have any other user accounts on the system and if you do check their home folders for the .n8n folder.

are the wokflows stored in the database?

How is it possible for this to happen??

I lost 4 or 5 “new” workflows and 6 or 7 modifications to existing workflows.

Every day i was logging in and the workflows were there… and the modifications…

it makes no sense…

I am just downloading the database.sqlite file.

Is there anything to look at?

Hey @xewonder,

Yeah the workflows will be stored in the database and 0.236 didn’t have any of the workflow history stuff in it so whatever is saved will be in there. Oddly just restarting shouldn’t have changed anything, Did you maybe do an update or was it just a restart?

If you are looking in the database itself check the workflows table to see what is in there, You might be lucky and it could be a bug on the older version that we have not seen before.

Unbelievable!

There is nothing in the database i just downloaded (from yesterdays image).

I was working on the new workflows this morning before the docker restart.

How is this possible? does it keep things in memory??

Hey @xewonder,

Somethings are kept in memory but workflows are stored in the database, Have you checked that there is no other users on the system with a .n8n folder in their home path?

Do you have the workflow execution history in the execution log?

no other users, and no execution logs for the “modified” workflows.

As i say, what is crazy is that i worked on them this morning…

I think for now I’m screwed… but I don’t want it to happen again!

Hey @xewonder,

I am still not sure how it even happened in the first place, I think there is an important bit of information missing I am just not sure what it is.

I would say as there are no other reports of this it must be something local although you are using version 0.236 and we removed 0.236.0 and 0.236.1 so you could be on a version that doesn’t “exist” but a lot has also changed since July so it could be worth updating.

The only thing that was done in the past was to add curl and jq to the docker image

docker exec -it c439bd61bd67 /bin/sh
apk add curl && apk upgrade
apk add jq && apk upgrade
exit

The thing that i totally do not understand is how it can be that when the workflows are stored in the database and i was working on them 5 minutes before they vanish… and also from the image from the previous day.

Maybe a weeks work was just in my dreams and i actually did not do anything and just woke up?

Jokes apart, the docker was restarted as mysql was not returning values on a perfect query… (validated in toad)

I close this as it is impossible to find out now what happened. The good thing out of this is that i am now backing up all my workflows and database every night.

Thank you for the help

1 Like

This topic was automatically closed 90 days after the last reply. New replies are no longer allowed.