Installed new n8n version but lost all data, can I restore?

Hi n8n community,

I was updating n8n to the latest version using the following commands:

# Get the container ID
docker ps -a

# Stop the container with ID container_id
docker stop [container_id]

# Remove the container with ID container_id
docker rm [container_id]`

After successfully uninstalling the old n8n container, I attempted to install the latest version. However, I noticed that all of my workflows were gone. I checked the n8n_data volume in /var/lib/docker/volumes/n8n_data/ and found the database.sqlite file.

Can I restore my workflows from the database.sqlite file?

If so, how can I do this?

Information on your n8n setup

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

Hi @Ivars_Pavlovich :wave: Sorry to hear you ran into this!

Can you tell us in a little bit more detail about how you’re launching n8n? It might be that you’re not using the n8n_data volume, which would be fixed by first stopping n8n, then setting the volume correctly - it should then use that volume and bring in the data :bowing_man:

Sure.

I did install via Portainer using Docker Hub path

And here is stored old database.

To be honest I’m only 3 months in self hosting, so that is why I have made mistake.So i would say im newbie

Hi @Ivars_Pavlovich :wave: Sorry for the delay on this one, I was out yesterday!
It looks like your volume may not be set up correctly - can you try to make sure it’s following a path structure like n8n_data:/home/node/.n8n, as we mention over here in our docs? Docker Compose | n8n Docs

You’d specifically be looking at lines 53/54.

If that doesn’t fix this up for you, could you share your Portainer stack? :bowing_man:

1 Like

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