Backup Restoreのロゴ

Backup Restore

組織
serversathome
backup-restore

Understand and operate the homelab's snapshots and backups: how they work on each platform and how to take, list, verify, and restore/roll back safely. Use this whenever the user asks to snapshot, back up, restore, roll back, or recover a VM, LXC, dataset, pool, config, or app; asks "can I undo this", "is there a backup", "how do snapshots work here", or "are the backups current"; or right before you propose a risky/destructive change and want to offer a snapshot as a safety net. Do NOT snapshot everything pre-emptively on every task - reach for this when recovery is the actual subject, or to offer one safety net before a specific dangerous operation.

概要

公開者serversathome
リポジトリhomelabhero
スキル名backup-restore
スター
104
フォーク
4
同梱ファイル
指示のみ
リンク
  • Markdown形式の指示

    モデルが必要に応じて読み込むSKILL.mdファイルです。関連するリクエストがあったときだけトークンを消費します。

  • どのLLMでも利用可能

    AIスキルはプロバイダー固有のコードではなく、通常のMarkdownなので、GPT、Claude、Gemini、Grok、ローカルモデルで利用できます。

  • 指示だけで完結

    モデルに必要なものはすべて指示に含まれているため、別途同期するファイルはありません。

  • オープンソース

    serversathomeがGitHubで公開しています。インストールする前にソースを確認してください。

インストール

AIスキル「Backup Restore」をTypingMindにインストールすれば、どのLLMでも利用できます。SKILL.mdを読み取れる別のAIエージェントに追加することもできます。

1

TypingMindにインストール

TypingMindはGitHubフォルダから直接スキルをインストールします。SKILL.mdを読み取り、リソースファイルをまとめてローカルに保存します。

  1. アプリを開き、「プラグイン」→「スキル」に移動します。
  2. 「GitHubからインストール」を選択します。
  3. 以下のスキルフォルダのURLを貼り付けて確定します。
    https://github.com/serversathome/homelabhero/tree/main/ops/.claude/skills/backup-restore
  4. スキルを利用したいチャットごとに、そのスキルを有効にしてください。
「プラグイン」→「スキル」→「スキルを追加」→「GitHubのURLから」を選択し、フォルダのURLを貼り付けて「続行」を押します。
2

別のAIエージェントにインストール

Agent Skills形式を読み取れるAIエージェントなら、このスキルを利用できます。フォルダをそのAIエージェントのスキルディレクトリにコピーしてください。

Claude Code — .claude/skills
git clone --depth 1 https://github.com/serversathome/homelabhero.git /tmp/homelabhero
mkdir -p .claude/skills
cp -r /tmp/homelabhero/ops/.claude/skills/backup-restore .claude/skills/backup-restore
コピー後、新しいスキルを読み込むためにClaude Codeを再起動してください。

TypingMindで使用

TypingMindのチャットでBackup Restoreを有効にするだけで、あとはモデルが対応します。名前と説明がシステムプロンプトに含まれ、関連するリクエストがあると、モデルが指示の全文を自動で読み込みます。手動で呼び出す必要はなく、実際に使用されるまでトークンを消費しません。

関連するリクエストがあるとすぐに、モデルが自動的にBackup Restoreを読み込みます。

どのAIモデルでも利用可能

AIスキルはプロバイダー固有のコードではなく、通常のMarkdownで書かれた指示です。そのため、Backup Restoreは作成時に想定されたモデルに縛られません。TypingMindに一度インストールすれば、ご自身のAPIキーを使って、GPT-5、Claude、Gemini、Grok、DeepSeek、Mistral、Llama、またはご自身で実行するローカルモデルで利用できます。

  • 必要なときだけ読み込み

    システムプロンプトには名前と説明だけが含まれます。関連するリクエストが初めてあったときに指示を取得するため、スキルを使わない間は指示の読み込みにトークンを消費しません。

  • チャットの途中でモデルを切り替え

    スキルはコードではなく指示なので、モデルを切り替えてもそのまま使えます。次のモデルも同じSKILL.mdを読み込みます。

スキルの指示

モデルが読み込むSKILL.mdの内容です。スキルはモデルが従う指示なので、インストールする前に確認してください。

Backups and snapshots

Recoverability is the safety net this homelab is built on (see CLAUDE.md). This skill is the knowledge for using it: what each platform offers, and how to take, inspect, and restore. Everything runs through hh run <alias> "<command>". On TrueNAS, prefer midclt (the middleware) for snapshot/replication tasks.

Golden rules:

  • Taking a snapshot is safe and cheap. Deleting one, rolling back, or restoring OVER live data is destructive of newer state - treat it like any destructive op: state exactly what it affects and get an explicit go-ahead first.
  • Before you propose a risky change (dataset/pool/VM edit or delete, a migration, a bulk config change), OFFER to snapshot first and name it clearly. Offer it for the specific risky op; do not snapshot on every routine task.
  • A rollback is not a merge. ZFS rollback discards everything written after the snapshot and destroys intermediate snapshots. Always confirm target and loss.
  • Prefer non-destructive restore first: clone / restore to a NEW name, verify, then swap. Overwrite-in-place only when the user accepts losing newer state.

TrueNAS (ZFS)

zfs list                                   # datasets; zpool list for pools
zfs snapshot tank/data@before-change       # take one (-r = recursive)
zfs list -t snapshot -r tank/data          # list, with USED space each
zfs list -t snapshot -o name,creation -s creation | tail   # most recent
zfs rollback tank/data@before-change       # DESTRUCTIVE: discards newer state
                                           # (-r also destroys later snapshots)
zfs clone  tank/data@snap tank/data-restore  # non-destructive: mount + verify
zfs destroy tank/data@snap                  # remove a snapshot

Restore a single file without rolling back: snapshots are browsable read-only under the dataset's hidden .zfs/snapshot/<name>/ directory - copy the file out.

Scheduled protection lives in the middleware (use the truenas-middleware skill to read method schemas before creating anything):

midclt call pool.snapshottask.query        # periodic snapshot tasks
midclt call replication.query              # replication (off-box copies)
midclt call cloudsync.query                # cloud/rsync backup tasks

Proxmox (VM/LXC snapshots + vzdump backups)

Snapshots (fast, same-host, point-in-time):

qm snapshot  <vmid> before-change [--vmstate 1]   # VM (+RAM with vmstate)
qm listsnapshot <vmid>
qm rollback  <vmid> before-change                 # DESTRUCTIVE (current state)
qm delsnapshot <vmid> before-change
pct snapshot/listsnapshot/rollback/delsnapshot <ctid> ...   # LXC equivalents

Backups (full, restorable to a new guest or storage):

vzdump <vmid> --storage <stor> --mode snapshot    # no downtime
pvesm list <stor>                                  # list backups on a storage
qmrestore <backupfile> <newvmid>                   # restore VM (new id = safe)
pct restore <newctid> <backupfile>                 # restore CT (new id = safe)

Restoring over an existing id needs --force and destroys it - confirm first. Check the schedule/last run: pvesh get /cluster/backup (and Proxmox Backup Server if used).

Linux hosts

No universal snapshot facility - detect what exists first:

command -v zfs lvs restic borg timeshift snapper 2>/dev/null
  • ZFS/LVM present: snapshot the relevant filesystem/volume as above (LVM: lvcreate -s -n snap -L 5G /dev/vg/lv).
  • restic/borg present: restic snapshots / borg list to inspect; restore per their docs.
  • Config-only change: before editing, copy the file aside with a dated suffix (cp foo.conf foo.conf.bak-YYYYMMDD) - the minimal, honest safety net.
  • If nothing snapshot-capable exists, say so plainly rather than implying an undo that isn't there.

Verify backups are real and recent

Do this when asked "are we covered" and as the first step of any restore:

  • TrueNAS: newest snapshot per important dataset (command above); snapshot and replication tasks enabled and not erroring.
  • Proxmox: newest vzdump per guest is within the expected cadence; the scheduled job actually ran.
  • Flag anything stale (older than its schedule) as a gap - that is a finding, not a footnote.

Restore workflow

  1. Identify exactly what to restore and where (in place vs to a new name).
  2. Go non-destructive first (clone / new vmid / copy-out), verify it, then swap.
  3. State the blast radius, confirm, execute, then verify the result.
  4. If this was a real recovery, append a runbook entry (symptom, cause, fix).

よくある質問

AIスキル「Backup Restore」では何ができますか?

Understand and operate the homelab's snapshots and backups: how they work on each platform and how to take, list, verify, and restore/roll back safely. Use this whenever the user asks to snapshot, back up, restore, roll back, or recover a VM, LXC, dataset, pool, config, or app; asks "can I undo this", "is there a backup", "how do snapshots work here", or "are the backups current"; or right before you propose a risky/destructive change and want to offer a snapshot as a safety net. Do NOT snapshot everything pre-emptively on every task - reach for this when recovery is the actual subject, or...

TypingMindでBackup Restoreを使うメリットは何ですか?

一度インストールすれば、どのモデルでも使えるからです。Backup Restoreはプロバイダー固有のコードではなく、通常のMarkdownで記述されているため、同じスキルをGPT-5、Claude、Gemini、Grok、ローカルモデルで利用できます。チャットの途中でモデルを切り替えても、そのまま使い続けられます。TypingMindは自分のAPIキーで動作するため、シート単位のサブスクリプションではなく、プロバイダーに直接料金を支払います。スキルとチャットは自分のストレージに保持されます。

TypingMindにBackup Restoreをインストールするにはどうすればよいですか?

TypingMindで「プラグイン」→「スキル」→「GitHubからインストール」を開き、https://github.com/serversathome/homelabhero/tree/main/ops/.claude/skills/backup-restoreを貼り付けてください。TypingMindがSKILL.mdを読み込み、チャットごとに有効にできるスキルとしてインストールします。

Backup Restoreを使えるAIモデルはどれですか?

TypingMindに接続したどのモデルでも利用できます。AIスキルはプロバイダー固有のコードではなく、通常のMarkdownで書かれた指示です。そのため、GPT、Claude、Gemini、Grok、ローカルモデルのいずれも、リクエストの内容がこのスキルの用途に合ったときに、このスキルを読み込めます。

Backup Restoreで使えるAIモデルの数に制限はありますか?

数に制限はありません。スキルに対応したモデルであれば、GPT、Claude、Gemini、Grok、DeepSeek、Mistral、Llamaなど、どのモデルでもBackup Restoreを利用できます。すべてTypingMind上で、自分のAPIキーを使って利用できます。

AIスキル「Backup Restore」は無料ですか?

serversathomeがGitHubで公開しています。ライセンス条件はリポジトリでご確認ください。ご利用のAIプロバイダーに支払うのは、使用したトークンの料金だけです。

AIスキルとは何ですか?

AIスキルは、特定のタスクの実行方法をAIモデルに教える、再利用可能な指示のセットです。オープンなAgent Skills形式に従い、名前と説明を含むSKILL.mdファイルに加え、モデルが必要とするスクリプト、テンプレート、参照ファイルで構成されます。モデルはリクエストがスキルに合致したときだけ指示を読み込むため、インストール済みのスキルも、使うまでは費用がかかりません。

AIスキルは、プラグインやMCPサーバーとどう違いますか?

プラグインやMCPサーバーは、モデルが呼び出せる新しいツールを提供します。ツールとは、どこかで実行され、結果を返すコードです。一方、AIスキルは、タスクへの取り組み方、従うべき手順、望ましい出力の例といった知識や進め方をモデルに伝えます。スキルは通常のMarkdownで記述されているため、サーバー、APIキー、実行環境は不要で、どのモデルでも利用できます。

すべて見る

今すぐ自分専用のAIワークスペースを作成

ニュースレターに登録すると、新機能や今後のプレゼント企画のお知らせが届きます👇