メインコンテンツへ移動

Workflow Backup for n8n

n8n のすべてのワークフローを毎晩 JSON ファイルとしてパソコンにバックアップ。ワークフローの一覧しか見られないキーを使います。1 ファイルでも 1 日分でも復元可能。Docker 上の n8n 2.49.7 付き。

  • n8n
  • n8n Schedule Trigger node
  • n8n node
  • n8n Convert to File node
  • n8n Read/Write Files from Disk node

スクリーンショット

スクリーンショット 1 / 6:Workflow Backup for n8n のタイトル カード: 説明文、技術のチップ、実行後の Workflow backup ワークフロー。各ステップに 3 件のアイテム。

Workflow Backup for n8n のタイトル カード: 説明文、技術のチップ、実行後の Workflow backup ワークフロー。各ステップに 3 件のアイテム。

買い切り価格

  • ₹99+GST(合計 ₹116.82)
  • $2
  • お支払いが確認されると、すぐにライブラリからダウンロードできます。
  • このプロジェクトの今後のリリースもすべて、追加費用なしで含まれます。
最新リリース
1.0.0 · 2026/11/27
ライセンス
Source Code Licence

概要

n8n の夜間バックアップの完全なソースです。毎晩 2:00 (あなたのタイム ゾーン) に、一覧の取得しかできないキーで n8n 自身の API からすべてのワークフローを取得し、日付入りの JSON ファイルとしてパソコンのフォルダーに保存します。ワークフロー、n8n 2.49.7 の Docker Compose、テスト済みの復元手順を含みます。macOS でテスト済み。

壊れたワークフロー、まずい編集、失われた Docker ボリュームは、何時間分もの作業を消してしまいます。Workflow Backup for n8n は n8n のすべてのワークフローのコピーを毎晩新しく作ってあなたのパソコンに保存するので、いつでも元に戻せます。下に挙げたケースはすべて、macOS 上の n8n 2.49.7 と Docker Desktop でテストしました。

できること

  • 毎晩、すべてのワークフローをバックアップ。 あなたのタイム ゾーンで 2:00 に、n8n 自身の API からすべてのワークフローを取得し、それぞれを JSON ファイルとして backups フォルダーに保存します。
  • 見つけやすいファイル名。 ファイル名はワークフロー名、その ID、日付でできています (例: Daily report (nYpK5qpnSoGjboNz) 2026-11-27.json)。同じ名前のワークフローが 2 つあっても上書きし合うことはなく、名前の中の / は - になります。
  • ワークフローの一覧しか見られないキーを使用。 n8n API キーに必要なスコープは workflow:list の 1 つだけ。バックアップはワークフローを読むだけで、何も変更できません。キーは n8n の中で暗号化されたままで、バックアップ ファイルにはキーも、ほかのクレデンシャルの秘密情報も含まれません。
  • 停止中の分を取り戻します。 2:00 に n8n が止まっていたら、n8n が次に起動したときにバックアップを 1 回実行します。
  • 2 通りの復元。 1 つのファイルを n8n エディターでインポートするか、1 日分のすべてのワークフローを 1 つのコマンドで復元できます。復元したワークフローは非公開の状態で戻るので、確認してから公開できます。
  • 必要なら n8n も起動。 compose.yml が Docker 上で n8n 2.49.7 を起動します。アクセスできるのはあなたのパソコンからだけで、backups フォルダーは n8n がファイルを書き込める場所にマウントされます。

インストール

  1. アーカイブを解凍し、そのフォルダーでターミナルを開きます。
  2. タイム ゾーンを .env に保存し、docker compose up -d で n8n を起動します。すでに Docker で n8n 2 を使っている場合は、README のとおり、そちらに backups フォルダーを追加します。
  3. http://localhost:5678 を開き、オーナー アカウントを作成します。
  4. スコープが workflow:list だけの n8n API キーを作成します。
  5. workflows/workflow-backup.json をインポートし、Get all workflows にキーを接続して、Execute workflow で最初のバックアップを作ります。
  6. ワークフローを公開します。

スクリーンショット付きの全手順 (英語): How to Set Up and Run the Workflow Backup for n8n (新しいタブで開きます)。

知っておきたいこと

  • 対象はワークフローだけ。 各ファイルにはワークフローのノード、設定、タグ、固定データが入ります。クレデンシャルは名前だけで、データ テーブルと実行履歴は含まれません。
  • 時刻は 1 つのノードで変更。 Nightly schedule は既定で 2:00 に実行されます。
  • 古いバックアップは削除するまで残ります。 同じ日に 2 回目のバックアップを取ると、その日のファイルが置き換わります。
  • n8n は同梱していません。 compose.yml が n8n の公式イメージをダウンロードし、n8n には n8n 自身のライセンスが適用されます。
  • macOS で Docker Desktop を使ってテスト済み。

仕組みを学ぶ

無料の n8n Tutorial for Beginners (新しいタブで開きます) (英語) で n8n を最初から学べます。Part 6: Credentials: Connect n8n to Your Apps (新しいタブで開きます) では、このワークフローが使う API キーとクレデンシャルを作成し、How to Create an n8n API Key (新しいタブで開きます) ではスコープを詳しく説明しています。

n8n は n8n GmbH の商標です。Docker は Docker, Inc. の商標です。その他の名称は各所有者の商標です。

無料チュートリアルシリーズ

n8n Tutorial for Beginners

作りながら学びたい方へ。ブログの無料ステップガイドで、このプロジェクトの作り方を順を追って紹介しています。

シリーズを読む (新しいタブで開きます)

手に入るもの

アーカイブの中身が一目でわかります。

  • 完全なソースのバージョン 1.0.0: n8n ワークフロー 1 つ、Docker Compose ファイル、.env の例、空の backups フォルダー、README
  • Workflow backup ワークフロー: 夜間のスケジュール、n8n API からすべてのワークフローを取得するステップ、それぞれを JSON ファイルにするステップ、ファイルを保存するステップ
  • ワークフロー名、ID、日付を使ったファイル名。スラッシュを含む名前でも安全
  • スコープが workflow:list だけの API キーを作る手順
  • n8n 2.49.7 の compose.yml。あなたのパソコンからだけアクセスでき、backups フォルダーをマウントし、ポートとタイム ゾーンは .env で設定
  • セットアップ手順、バックアップ ファイル、1 つのワークフローまたは 1 日分の復元、設定、トラブルシューティング、後片付けを載せた README

使用している技術

開発と動作確認に使った実行環境とバージョンです。

  • n8n2.49.7
  • n8n Schedule Trigger node1.4
  • n8n node1
  • n8n Convert to File node1.2
  • n8n Read/Write Files from Disk node1.1
  • Docker Compose5.7.1
  • Docker Engine29.9.3

アーカイブの中身

展開したあとに手元に残るファイル構成です。

workflow-backup-n8n/

  • .env.example
  • .gitattributes
  • .gitignore
  • README.md
  • backups/
    • .gitkeep
  • compose.yml
  • workflows/
    • workflow-backup.json

必要になるもの

動かすために必要なアカウントやサービスです。あとから驚くことはありません。

  • 自分で動かす n8n 2 (無料の Community Edition で十分)、または同梱の n8n を動かすための Docker
  • compose.yml を使うための Docker Desktop (macOS または Windows)、または Docker Engine (Linux)
  • パソコンの空いているポート (既定は 5678)
  • Docker で自分の n8n を使う場合: README のとおり /home/node/.n8n-files/backups にマウントしたフォルダー

リリース

これまでのすべてのバージョンを新しい順に並べています。

  1. 1.0.0最新

    完全なソースの最初のリリースです。

    • n8n のすべてのワークフローを毎晩 2:00 にバックアップし、ワークフローごとに 1 つの JSON ファイルを backups フォルダーに保存します。
    • スコープが workflow:list だけのキーで、n8n 自身の API からワークフローを読み取ります。
    • 2:00 に n8n が止まっていた場合は、1 回実行して取り戻します。
    • 1 つのワークフロー (エディターでインポート) または 1 日分 (n8n のコマンド ライン) を復元する手順。
    • compose.yml による Docker 上の n8n 2.49.7。macOS でテスト済み。

Source Code Licence

利用できる範囲

What you may and may not do with the source code you buy.

ライセンスの全文を読む
  1. What this licence covers

This licence governs every file included in a product you buy from Dewiride Store: source code, configuration, database scripts, sample data, documentation and any other file in the download. It takes effect when your payment is confirmed and applies to every release of that product that reaches your library. Files that reach your library through an annual updates membership are governed in exactly the same way.

It forms part of the Terms of Sale and Use. Where a product page states different or additional licence terms for that product, those terms prevail for that product. The membership page may likewise state different or additional licence terms for the files a membership carries, and those terms then prevail for those files.

  1. The licence we grant you

We grant you a perpetual, worldwide, non-exclusive, non-transferable licence to use, reproduce, adapt, translate and modify the files, and to include the result in your own work, on the conditions set out below.

Perpetual means it does not expire. Worldwide means it is not limited to any country. Non-exclusive means we license the same product to other customers. Non-transferable means you cannot pass it on to someone else.

The licence is granted to you — either you personally, or the organisation you identified when buying. Everyone working within that organisation may use the files for that organisation’s projects. Nobody outside it may.

  1. What you may do
  • Use and change the files in your own projects, commercial or otherwise, with no limit on the number of projects.
  • Build a product or a service on them and charge your own customers for it.
  • Deploy the result for a client, as part of work you are doing for that client.
  • Distribute the result in compiled, deployed or otherwise non-source form.
  • Keep as many back-up copies as you reasonably need.
  • Study, observe and test how the code works, and obtain the information you need to make it work with your own software.

The last two are yours by law under sections 52(1)(aa) to (ac) of the Indian Copyright Act, 1957, and nothing in this licence is intended to take them away.

  1. What you may not do
  • Resell, sublicense, redistribute or publish the files themselves, in whole or in substantial part, in source form.
  • Include them in a template, starter kit, course, tutorial repository or component library that you sell or give away, where the code is the thing being supplied.
  • Share your account, your download links or your invoices with anyone outside your organisation.
  • Publish the files in a public repository, or in any other place where they can be obtained without buying them.
  • Remove or obscure the copyright and attribution notices in the source files.
  • Use the files to build something whose main purpose is to compete with Dewiride Store as a supplier of the same code.

The distinction that matters is simple: you may sell what you build with the code; you may not sell the code.

  1. Third-party components

Our products depend on open-source libraries, frameworks and services that we did not write. Those remain under their own licences, which we do not and cannot change. Where a product includes or requires such a component, its licence is named in the product’s documentation, and complying with it is your responsibility.

  1. Releases

Every release of a product you own is covered by this same licence and appears in your library at no extra cost. A release you have already downloaded remains licensed to you even if we later stop publishing the product. A release that reached your library through an annual updates membership is licensed to you on these same terms, and stays licensed after the period that carried it has ended.

  1. Ownership

We keep ownership of the files and of the copyright in them. You own whatever you create with them: your changes, your additions and the product you build are yours.

  1. If this licence ends

This licence ends if you materially breach it and do not put the breach right within thirty days of us asking you to in writing. It also ends if your payment is reversed or refunded, because the purchase it depends on no longer stands. Where a membership period is refunded or reversed, the licence ends for the releases that period carried and for nothing else: anything you bought separately, or that another period carried, is unaffected.

If it ends, you must stop using the files and delete the copies you hold. Work you had already delivered to a client before that point may continue in use, so that ending this licence never breaks something your own customer relies on.

  1. No warranty beyond the description

The warranties and limits in section 19 and section 20 of the Terms of Sale and Use apply to this licence as well.

  1. Governing law

This licence is governed by the law of India, and section 24 of the Terms of Sale and Use applies to any dispute about it. If a translation and the English version differ in meaning, the English version governs.