From ‘Oops’ to ‘Up’ in One Command: My New n8n Backup/Restore Shell


Yesterday I shipped a tiny side‑project—a battle‑tested shell wrapper that lets you export & import your n8n data outside the n8n UI.

“Hey Nskha, why not just use an n8n workflow?”
Same here—I already have dozens of backup workflows and have shared some. But updating or importing workflows inside a customer’s instance has blown up on me more than once (yeah, that awkward client‑demo day :grimacing:). Our partners asked for a CLI that never lives inside n8n but can access it… so here it is.


What it does

  • Backup or restore everything (or just workflows) from any n8n Docker container.
  • Runs completely outside n8n, so no node‑version mismatch headaches or missing libs (Built based on alpine n8n image).
  • Plays nicely with CI/CD—drop it into another n8n node or cron and forget about it.
  • Zero‑Coding: curl → chmod → go.

Repo

Automations‑Project/n8n‑data‑manager
https://github.com/Automations-Project/n8n-data-manager


Quick dev start (export)

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

Swap backuprestore for imports.


Safety first

Paste the script into your favorite AI/code‑scanner if you’re worried—I keep it clean. A shorter one‑liner installer is on the way.


Roadmap

  • One‑click command builder on the website (almost done).
  • Scheduled auto‑backups with telegram notifications / targeted audience dev→prod transfers.

Give it a spin & tell me what breaks! :pray:

1 Like