From 'Oops' to 'Up' in One Command: Introducing n8n-data-manager

Jane Doe
11 Jan 2023
5 min read

Table of contents

Have you ever experienced that sinking feeling when a client demo goes wrong because your n8n instance crashed or data was lost? We've all been there. That's why I'm excited to share a powerful new tool that can save you from those uncomfortable situations.

Introducing n8n-data-manager: Your Backup Safety Net

The n8n-data-manager is a CLI tool that allows you to export and import your n8n data without using the n8n UI. This means you can back up and restore your workflows, credentials, and other data with a simple command, even if your n8n instance is experiencing issues.

Why This Tool Matters

While many of us have created backup workflows within n8n, there's an inherent problem: when n8n itself is down or experiencing issues, those internal backup solutions become inaccessible. The n8n-data-manager solves this problem by operating completely outside the n8n environment.

Key Features That Make a Difference

  • External Operation: Works completely outside of n8n, eliminating node-version compatibility issues
  • Docker-Friendly: Backup or restore from any n8n Docker container with ease
  • CI/CD Compatible: Integrates smoothly into your development pipeline
  • Zero Coding Required: Simple curl → chmod → go setup process
  • Selective Backup: Option to backup everything or just specific workflows

Getting Started in Minutes

The setup process is straightforward. Here's a quick example for backing up your data:

clear && \

  sudo rm -f /usr/local/bin/n8n-manager.sh && \

  rm -rf ~/.config/n8n-manager /tmp/n8n-* n8n-shell-install.sh && \

  curl -sSL -o n8n-shell-install.sh \

    https://raw.githubusercontent.com/Automations-Project/n8n-data-manager/main/install.sh && \

  chmod +x n8n-shell-install.sh && \

  ./n8n-shell-install.sh && \

  n8n-manager.sh \

    --action backup \

    --container "$(docker ps --filter "name=n8n" --format "{{.Names}}" | head -n 1)" \

    --token "<YOUR_GITHUB_TOKEN>" \

    --repo  "<yourusername/yourrepo>" \

    --branch main \

    --trace --verbose --dated

To restore your data, simply change `--action backup` to `--action restore`.

Safety and Security

Security is a top priority. The script is open-source and available for inspection. You can review the code on GitHub or scan it with your favorite AI/code-scanner before running it.

What's Coming Next

The development roadmap includes:

  1. A command builder on the website to help you create the perfect backup command
  2. Scheduled automatic backups with notification options
  3. Targeted transfers between development and production environments

Why Use This Instead of Built-in Options?

You might be wondering, "Why not just use an n8n workflow for backups?" That's a valid question! While n8n workflows are powerful, they have limitations:

  1. When your n8n instance is down, your backup workflows are inaccessible
  2. Environment mismatches can cause import/export failures
  3. External tools provide an additional layer of security
    This tool was created based on real-world challenges faced by our partners who needed a reliable CLI that could access n8n data without being dependent on the n8n platform itself.

Ready to Try It?

The n8n-data-manager is available on GitHub at https://github.com/Automations-Project/n8n-data-manager.

Give it a try and share your feedback! This tool was built to solve real problems for the n8n community, and your input will help make it even better.

Have you experienced data loss in n8n? What backup strategies do you currently use? Share some love for the creator of this script Nskha!

Ready to start automating?

Let’s cut down the manual, unfulfilling work and free up time for what actually drives growth.