← Back to blog

n8n Backup and Restore: An Isolated Recovery Exercise

Practise n8n backup and restore with a same-version SQLite recovery exercise that checks inventory, stored credentials and required files in an isolated target.

A recovery case holds automation parts and a key beside an isolated workbench for n8n backup and restore.

Checked against the cited sources on .

Your n8n backup and restore task

An isolated n8n recovery target connects only to a test service behind a barrier from production.
The enclosure illustrates the exercise’s required isolation and designated test-service access.

This editorial exercise asks you to rehearse n8n backup and restore: recover a stopped instance into a separate target, then check its inventory, a stored test credential and required files. The proposed procedure has not been executed or validated.

The worked scope is self-hosted, single-instance SQLite, using the publish/unpublish controls documented for n8n 2.0. PostgreSQL restore commands, queue recovery, external-storage configuration and cross-version migrations are outside this exercise. n8n documents that startup applies pending database migrations; matching versions is our exercise constraint, not a compatibility guarantee. The cited official documentation is undated and reflects its state when checked; the source-check dates displayed with the citations are not publication dates.

Start only with an administrator-prepared target meeting the prerequisites below. Network isolation depends on your infrastructure; implementing it is outside the supplied documentation. We think recovery practice is most useful when containment is a prerequisite rather than something participants must improvise.

Sources: n8n-docs/docs/deploy/host-n8n/keep-n8n-running/backup-and-restore.md at main · n8n-io/n8n-docs · GitHub, n8n-docs/docs/deploy/host-n8n/configure-n8n/use-the-command-line.md at main · n8n-io/n8n-docs · GitHub, n8n/.agents/skills/db-migrations/SKILL.md at master · n8n-io/n8n · GitHub

Prepare the fixture and backup inventory

A tray holds the folder, encryption key, configuration and dependencies for an n8n backup.
The separate objects illustrate the artifacts an administrator inventories before capture.

Before stopping the source, prepare a harmless workflow that uses an HTTP Request node with a stored credential for an administrator-provided test service. Explicitly select its authentication mode and credential. Define the expected response and ensure unauthenticated requests are rejected. These are suggested exercise inputs, not a validated test instrument.

Record workflow and user inventories, the n8n version, storage paths and deployment settings. If filesystem data is in scope, choose a known file and record its expected contents. Use the inventory below to distinguish the worked SQLite backup from additional artifacts your deployment may require.

Backup inventory based on n8n’s self-hosted documentation
ArtifactWhat to preserveExercise scope
.n8n folderEntire folder, including default SQLite dataWorked procedure
Encryption keyOriginal config or matching N8N_ENCRYPTION_KEYRequired for credentials
Deployment settingsConfiguration needed to recreate the deploymentRequired input
Additional storageConfigured binary and execution storage locationsInclude when configured
Custom nodesRequired custom-node directoriesInclude when configured
PostgreSQL databaseDatabase backup alongside other artifactsOutside worked procedure

n8n documents that workflow and credential CLI exports omit users, roles, execution history, variables and instance settings. Treat those exports as a partial artifact, not a substitute for the instance backup.

Sources: n8n-docs/docs/deploy/host-n8n/keep-n8n-running/backup-and-restore.md at main · n8n-io/n8n-docs · GitHub, skills/skills/n8n-credentials-and-security-official/references/HTTP_REQUEST_WITH_AUTH.md at main · n8n-io/skills · GitHub

Capture and restore the stopped instance

A stopped n8n machine, an archive case and an enclosed recovery target show the restoration sequence.
The sequence illustrates moving a stopped instance’s artifacts into the prepared recovery target.

Follow this suggested sequence for the n8n backup and restore rehearsal.

  1. Stop the source n8n instance before copying SQLite and the .n8n folder.
  2. Copy the complete user folder and preserve the inventoried additional paths, custom-node directories, deployment settings and encryption key.
  3. Restore those artifacts into the stopped, pre-isolated target using separate target storage.
  4. Restore deployment configuration, adapting target paths and addresses while preserving the matching encryption key.
  5. With the CLI configured against the restored target database, run n8n unpublish:workflow --all before starting the target.
  6. Start the isolated target and proceed to the selected verification checks.

For the n8n 2.0 publish/unpublish model, unpublishing is an additional startup control: it does not provide network isolation or prevent deliberate manual execution. The CLI documentation also warns that importing previously active workflows on non-multi-main instances can leave cron triggers running until restart, so import deactivation is not a containment substitute.

Do not use decrypted credential exports for this exercise: they expose secrets in plaintext.

Sources: n8n-docs/docs/deploy/host-n8n/keep-n8n-running/backup-and-restore.md at main · n8n-io/n8n-docs · GitHub, n8n-docs/docs/deploy/host-n8n/configure-n8n/use-the-command-line.md at main · n8n-io/n8n-docs · GitHub

Check recovery and diagnose failures

Reference and restored n8n artifacts sit side by side while a key is checked in a test lock.
Comparing artifacts and checking the test key illustrate the exercise’s selected recovery checks.

Use the following editorial completion criteria to assess the recovered instance. In our view, a visible workflow canvas is too weak a stopping point; the exercise should require evidence that the restored artifacts can actually be used.

If authentication fails, check the original encryption key, HTTP Request authentication mode, credential type and selected credential. n8n documents that a credential can be ignored when authentication is not enabled. If files or nodes are missing, compare restored locations and custom-node directories with your inventory before changing the workflow.

Sources: n8n-docs/docs/deploy/host-n8n/keep-n8n-running/backup-and-restore.md at main · n8n-io/n8n-docs · GitHub, skills/skills/n8n-credentials-and-security-official/references/HTTP_REQUEST_WITH_AUTH.md at main · n8n-io/skills · GitHub

Record what the rehearsal establishes

Finish your n8n backup and restore exercise with a recovery record: backup identity, source version, restored paths, check results and unresolved failures. Completion demonstrates only the selected checks; it does not establish coverage of every workflow, credential or external dependency.

Suggested reflection: which missing artifact would prevent another administrator from repeating the recovery? A useful response names the artifact, where it belongs in the backup procedure and how the next rehearsal will check it. Update that procedure before treating the exercise as complete.

Put this into practice

Hands-on n8n challenges

Pick a challenge and build a working workflow in your own n8n environment, with five progressive tips per challenge.

Try a hands-on challenge

For your team

Custom n8n training programs for one team or department, run on your own n8n instance with your own tools and data.

Training for your team

n8n skills assessment

A free quiz of about 20 minutes: 30 questions in 10 skill areas and a level from Beginner to Expert. On AI Adoption Score, another project by the author of this site.

Get your n8n level