Maaz Zindani

Loading the index…

↑↓ move↵ openesc close4072 pages

Help for owners

I have no proper backup of my n8n and could not restore it if the server died

Short answer

A complete n8n backup is the .n8n data folder plus your external database if you use PostgreSQL, and external storage if you use it. The CLI export of workflows and credentials is not enough: it leaves out users, execution history, variables and settings. Without the encryption key, saved credentials cannot be restored.

  • Written for business owners
  • Updated
  • By Maaz Zindani, Senior Software Engineer

Does this sound like your situation?

  • I do not know where n8n keeps its data.
  • The only backup is a server snapshot nobody has ever restored.
  • Someone exported the workflows once, months ago.
  • Some of my workflows would take weeks to rebuild.
  • I do not know where the encryption key is.

Why does this happen?

  1. Workflows are only part of the data

    n8n states that a complete backup needs more than the CLI export commands. The export gives you workflows and credentials. It does not contain users and their roles, execution history, variables or instance settings including the encryption key.

  2. The data folder holds the key

    The .n8n folder holds the config file with the credential encryption key. With the default SQLite database it also holds the database file. A custom key can instead be set with the N8N_ENCRYPTION_KEY variable.

  3. Without the key, credentials are unreadable

    n8n saves credentials encrypted. A restored database or an encrypted credential export cannot be decrypted without the original key, so every connected login would have to be entered again.

  4. Copying a live SQLite file can break the copy

    n8n says to stop it before copying the .n8n folder when you use SQLite, because copying while n8n is writing can give an inconsistent backup. In Docker, the folder lives in a volume, and a backups folder inside the container is not persisted.

  5. Restores overwrite and deactivate

    Exports carry the original IDs, and items with the same IDs on the target are overwritten. Imported workflows are deactivated by default, so a restore ends with turning them back on and testing them.

What can I do about it today?

  1. Find out who hosts n8n and whereOwn server, a cloud provider or a developer's account? You need to know whose hands the data is in.
  2. Ask where the encryption key is storedIt should be kept in a safe place separate from the server, such as a password manager your company controls.
  3. Ask for a full copy todayThe data folder, plus the PostgreSQL database if there is one, taken in the way n8n describes. Ask for it to be stored away from the server.
  4. Do not leave a plain-text credential export lying aroundn8n warns that a decrypted export shows all sensitive data in plain text. If one exists, ask for it to be protected or deleted once it is no longer needed.
  5. List the workflows that matter mostThese are the ones you will check first after any restore.

When should I bring someone in?

  • The server has failed or n8n will not start and there is no known good copy.
  • Nobody can say where the encryption key is.
  • You have never tested a restore.

How do I handle it?

  1. Inventory what existsI find the data folder, the database, any external storage, custom node folders and the environment settings.
  2. Take a consistent copyWith the method n8n documents for your database type, and the key stored separately.
  3. Automate itA scheduled backup copied off the server, with a failure alert.
  4. Test a restore on a copyI restore to a separate machine and check that the credentials decrypt and the workflows turn on.
  5. Write the recovery stepsA one-page runbook so that anyone on your side can follow it.

The price depends on what I find, so I quote in writing after a short discovery call. Tell me what is happening and I reply within 24 hours.

What do owners ask about this?

Is exporting my workflows enough?

No. n8n says CLI exports do not include users, execution history, variables or instance settings including the encryption key.

What if I lose the encryption key?

n8n says a restored database cannot be decrypted without it. Workflows may come back, but each saved login would need to be set up again.

How often should I back up?

That depends on how much work you could afford to lose. I agree it with you in writing.

Sources

How was this page made?

I drafted this page with AI assistance from the official documents listed under Sources. Found a mistake? Tell me.

For your developer: the technical fixes

Next step

Want this off your desk?

Send me a few lines on where things stand. I reply within 24 hours.