Upgrade from 0.x.x to 1.x.x and all of the workflow is gone and disappear

Upgrade from 0.x.x to 1.x.x and all of the workflow is gone and disappear

how can i find the previous workflow?

Information on your n8n setup

  • **n8n version: 1.x.x **
  • Database (default: SQLite):
  • **n8n EXECUTIONS_PROCESS setting default **
  • **Running n8n via (Docker) Synology **

Hi, the identical thing happened in my instance. In my case, i’m running in a container, and the first thing i saw when logging in after updating was the new user setup page, followed by a blank workflow.

I was able to restore my workflows by importing each from json exports i’d made a while back.

I’ve not had time to fully resolve the issue yet, but i was able to find the root cause.

Back in the 0.x.x days, the db & n8n ran as root within the container. Under 1.x.x the process now runs as the user node as described here:
n8n v1.0 migration guide
Due to this change, a new SQLite DB is created in ~node and even if the old db was to be checked, the node user can not access it due to it being owned by root (and being located in the root user’s home directory).

The same document has what appears to be a solution, suggesting that the following command is to be run on the ‘docker host’:

docker run --rm -it --user root -v ~/.n8n:/home/node/.n8n --entrypoint chown n8nio/base:16 -R node:node /home/node/.n8n

I’m running docker desktop on a mac, and am managing containers using portainer, so i’m not at all sure how or where to execute that docker command. i’ve basically resigned to create a fresh instance when i get a chance, which i’ll import my workflows into. For now i’m just not updating until i have the time to rebuild and currently have my workflows running just fine as long as i don’t upgrade the container image :wink:

Hope that helps in some way, good luck!

Hey @craigz,

The command is designed to be ran from a terminal where Docker is running, As you are using Portainer though there is more to it as Portainer doesn’t automatically change the user and keeps it as root.

For Portainer go to the containers advanced settings and change the user to node and the working directory to /home/node.

@simonlkch I suspect your issue will be somewhat similar, Double check your containers config if you are not launching it from a terminal.

@Jon @MutedJam worth merging this one into my thread?

1 Like

Hi @Luke_Austin, thanks for the heads-up. I think your link will do fine in helping anyone finding this thread. Tbh I am also a bit scared of the Mergin functionality as it will move individual posts rather than the whole thread :see_no_evil:

1 Like

Hi @Jon,

I just updated my image to run as node and changed the working directory to /home/node as you suggested, and it worked perfectly. Just wanted to drop a message to say thank you for the assistance and confirm that the upgrade to 1.x.x was successful with a docker image managed by portainer.

best,

-c.

2 Likes

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