How to Back Up Your n8n Workflows

Your n8n workflows represent real business logic and automation. Backing them up regularly protects you from accidental deletion, server failure, or a botched upgrade.

Method 1: Export Workflows from the n8n UI (Quick)

  1. Log in to your n8n dashboard.
  2. Click on the workflow you want to export.
  3. Click the three-dot menu (⋮) at the top right of the workflow editor.
  4. Click Download or Export.
  5. A JSON file will be downloaded to your computer. Store it safely (Google Drive, Dropbox, etc.).

Repeat for each workflow. For a large number of workflows, use Method 2 below.

Method 2: Export All Workflows via n8n CLI (SSH)

  1. SSH into your server.
  2. Run the following command to export all workflows at once:

n8n export:workflow --all --output=/home/backups/n8n-workflows-$(date +%Y%m%d).json

  1. This creates a single JSON file containing all workflows with a date stamp.

Method 3: Back Up the n8n Database (Full Backup)

n8n stores all data (workflows, credentials, execution history) in a database. Backing up the database file gives you a complete restore point.

If n8n is using SQLite (default on Hordanso starter plans):

cp ~/.n8n/database.sqlite /home/backups/n8n-db-$(date +%Y%m%d).sqlite

If n8n is using PostgreSQL:

pg_dump n8n_database > /home/backups/n8n-pg-$(date +%Y%m%d).sql

Automating Backups with a Cron Job

  1. SSH into your server.
  2. Type crontab -e.
  3. Add a daily backup at 2am:

0 2 * * * n8n export:workflow --all --output=/home/backups/n8n-$(date +\%Y\%m\%d).json

Restoring a Workflow from Backup

  1. Log in to n8n.
  2. Click the + menu and choose Import from File.
  3. Select your JSON backup file.
  4. The workflow will be imported and available to activate.

Tip: Store your backup JSON files in Google Drive or GitHub for off-server storage. You can automate this using an n8n workflow that exports and uploads to Drive on a schedule — a workflow that backs itself up!

 

  • n8n backup, n8n database backup, JSON export, n8n recovery, workflow export
  • 0 Users Found This Useful
Was this answer helpful?

Related Articles

How to Access Your n8n Instance After Purchase

Once your Hordanso n8n VPS is ready (usually within 5–30 minutes of purchase), here is how to...

How to Create Your First n8n Workflow

A workflow in n8n is a series of connected steps that run automatically. Here is how to create...

How to Connect n8n to WhatsApp

Connecting n8n to WhatsApp allows you to send and receive WhatsApp messages automatically as part...

How to Upgrade Your n8n VPS Plan

If your workflows are running slowly, timing out, or you are running out of storage on your n8n...

Troubleshooting Common n8n Errors

Here is a guide to diagnosing and fixing the most frequent n8n problems on Hordanso VPS. Error...

Powered by WHMCompleteSolution