Workflows revert to old version and executions cutoff at 10/6/25

I am new to n8n and have a self hosted site running on Docker Compose. One morning the system reverted back to an older version of my workflows. The data tables were also effected. The executions normally would show a full history but stops at the date 10/6/25 which is the date I seemed to loose the workflows. I was running the nightly build and seems to be updating automatically. I have switched back to latest. I do not know what nightly version I was running on 10/6/25.

Not sure what details to share. Any input would be appreciated. I would like to know if it is possible to recover my workflows and how to prevent this from happening in the future. I am currently looking into exporting my workflows to individual json files and setting up a nightly script to do a Docker n8n export.

Information on your n8n setup

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

Hey @MCheseldm

What you’re describing usually happens when n8n’s data directory inside Docker isn’t stored in a persistent volume. When Docker updates the container especially if you were running the nightly build it can start up a fresh container that doesn’t link to your previous data folder. That makes it look like your workflows and execution history have reverted to an older version, because n8n simply started from a clean internal directory.

To confirm this, check your Docker setup and make sure that your n8n container is saving data outside the container itself. The standard setup keeps all workflow data in the /home/node/.n8n directory. If that path wasn’t mapped to a local folder on your server or bound to a named Docker volume, all of your data would live inside the container which gets reset whenever the image updates.

You can also look for existing local data by checking the folder where Docker stores your volumes. If you find your old data directory there, you can manually recover your workflows by importing the JSON files back into n8n from the settings menu. If you were using an external database such as PostgreSQL or MySQL, double-check that your environment variables are still pointing to the correct database, because a mismatch can also make n8n appear to “lose” data.

Going forward, the best practice is to stop using the nightly image since those versions change frequently and can break schema compatibility. Instead, use a stable tagged version, for example the latest release, and always make sure that the container’s data folder is mapped to a local directory on your server. That way, even if you rebuild or update the container, your workflows, executions, and credentials remain intact.

You’re already on the right track with your plan to export workflows regularly. Automating a nightly export to JSON files is an excellent safeguard. You can then sync those files to a Git repository or cloud storage service, so even if something goes wrong, you can restore your entire setup in minutes.

If the data volume was replaced entirely and you don’t have backups, recovery unfortunately won’t be possible because n8n stores everything inside that directory. But once you have persistent storage and version-locked images, this problem won’t happen again.

In summary, what likely happened is that your nightly container updated and didn’t have a persistent data mount, causing n8n to revert to an empty state. Switching to a stable build, mapping the data directory to a local folder, and keeping automated exports will prevent any future data loss.

Thank you @FaithX1 for the prompt and excellent reply. I am working through your advice.

This is the case. I just got this step fixed and have at least my incomplete workflows. I have copied my files over my files with all the appropriate permissions from /var/lib/docker/volumes/n8n-docker-caddy_n8n_data/_data/ and have successfully loaded the web interface.

I now have a working model of exporting the workflows to individual JSON files and exporting my data table to a csv file once nightly. I am also downloading these files along with a zipped copy of my local directory.

I am working on implementing the export command but am familiar enough with bash scripts and should be able to accomplish this today. N8n’s AI has been very helpful in giving these commands. Your response gave me needed search terms needed. Thank you!!!

Still working out all the kinks. I believe my old data has been lost. I copied the contents of this folder over. What JSON files should I be seeing? I am now seeing the same incolplete workflows and history as I did with my docker-compose.yml pointing to /home/node/.n8n Do I assume the old data is lost?

I have changed my docker-compose.yml to

image: docker.n8n.io/n8nio/n8n:1.115.2

Am I correct this will lock me into the 1.115.2 version of n8n until I update? I assume then I would manually update as needed. Not sure on the best way to do this. Will the web interface accomplish the updates or do I need to edit the docker-compose,yml?

Big thanks for helping me out. I now have a better understanding of how to recover from data loss and how to backup my n8n instance. Both crucial pieces of information when I move into production.