Workflows, credentials and execution data lost

I’m experiencing a critical data loss issue with my n8n installation where workflows and their execution history aswell as credentials have mysteriously disappeared from the database over a specific time period.

Environment

  • n8n version: 1.120.3 (happened on older version)

  • Installation type: Docker

  • Database: SQLite

  • Database location: /var/lib/docker/volumes/n8n_data/_data/database.sqlite

  • OS: Ubuntu

  • VPS Provider: Hostinger

What Happened

  1. Missing Data Period: Workflows and credentials created during a specific period of several weeks have completely disappeared

  2. Older Workflows Intact: Workflows created before this period are still present and working fine

  3. Execution History Lost: The execution history for the missing workflows is also gone

  4. Not Related to Update: Initially suspected an n8n update, but after restoring a backup from before the update, the workflows were already missing in that backup too

Database Investigation

Using DBeaver to connect to the SQLite database, I confirmed:

  • The workflow_entity table shows a clear gap in the createdAt dates

  • The execution_entity table is missing corresponding execution records

  • No soft-delete flags or similar indicators that would suggest recoverable data

  • The database file itself shows no obvious corruption

What I’ve Tried

  1. :white_check_mark: Checked multiple backup points - workflows already missing in all of them

  2. :white_check_mark: Verified database integrity - no corruption detected

  3. :white_check_mark: Confirmed no accidental manual deletion (no one else has access)

Questions

  1. Has anyone experienced similar data loss with SQLite-based n8n installations?

  2. Are there known issues with SQLite data integrity under specific conditions?

  3. Could this be related to:

    • Docker volume mounting issues?

    • SQLite WAL (Write-Ahead Logging) mode problems?

    • Disk space issues causing incomplete writes?

    • File system issues on the VPS?

  4. Is there any way to recover deleted rows from SQLite? (I still have access to the database file)

Additional Context

  • The missing workflows were under test and inactive, executing successfully before they disappeared

  • No disk space issues were present during the affected period

  • Server uptime was normal with no unexpected restarts

  • No backup system was configured at the time (now implementing automated backups)Request for Help

    Has anyone experienced something similar? Any suggestions on:

    • Potential root causes to investigate?

    • Recovery methods for SQLite databases?

    • Best practices to prevent this from happening again?

    • Should I migrate from SQLite to PostgreSQL for better reliability?

    Any insights would be greatly appreciated. This is a production environment and losing workflows is critical for our operations. Thanks for your support :wink:

following this up cos i experienced similar data loss with SQLite-based n8n installation

1 Like

Same I thought when I was arguing with h.s.tngeer support, saying that is everything OK, but my corrupted db wasn’t!

Lost 2 days of intensive work…

They suggested as well to use FQLite (SQLite Forensic Toolkit) or the SQLite CLI to check corrupt files.

Highly RECOMMENDED!

Yea… just backup the .n8n with a bash script(sometimes I do it hourly :laughing:.

1 Like