Logo vun Backup Restore

Backup Restore

Organisatioun
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.

Iwwersiicht

Editeurserversathome
Repositoryhomelabhero
Skill-Nummbackup-restore
Stären
104
Forks
4
Matgeliwwert Fichieren
Nëmmen Instruktiounen
Linken
  • Instruktiounen am Markdown-Format

    Eng SKILL.md-Datei, déi de Modell bei Bedarf luet, soudatt nëmmen Token ufalen, wann eng Ufro tatsächlech dozou passt.

  • Funktionéiert mat all LLM

    KI-Skills si reng Markdown, keen ubidderspezifesche Code. Dofir funktionéiert dëse Skill mat GPT, Claude, Gemini, Grok oder engem lokale Modell.

  • Alles an den Instruktiounen

    Alles, wat de Modell brauch, steet an den Instruktiounen — keng zousätzlech Dateien ze synchroniséieren.

  • Open Source

    Vum serversathome op GitHub verëffentlecht. Liest de Quelltext, ier Dir de Skill installéiert.

Installatioun

Installéiert de KI-Skill Backup Restore an TypingMind, fir e mat all LLM ze benotzen, oder füügt en an en anere KI-Agent an, deen SKILL.md liest.

1

An TypingMind installéieren

TypingMind installéiert e Skill direkt aus sengem GitHub-Dossier — dobäi gëtt SKILL.md gelies, d'Ressourcedateie gi gebëndelt an d'Resultat gëtt lokal gespäichert.

  1. Maacht d'App op a gitt op Plugins → Skills.
  2. Wielt „Vun GitHub installéieren“.
  3. Pecht d'URL vum Skill-Dossier hei drënner an a bestätegt.
    https://github.com/serversathome/homelabhero/tree/main/ops/.claude/skills/backup-restore
  4. Aktivéiert de Skill an all Chat, an deem Dir e benotze wëllt.
Plugins → Skills → Skill afügen → Vu GitHub-URL, pecht dann d'URL vum Dossier an a klickt op Weider.
2

An engem anere KI-Agent installéieren

All KI-Agent, deen d'Format Agent Skills liest, kann dëse Skill benotzen — kopéiert den Dossier an de Skill-Verzeechnes vun deem KI-Agent.

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
Start Claude Code nom Kopéieren nei, fir datt den neie Skill erkannt gëtt.

An TypingMind benotzen

Aktivéiert Backup Restore an engem Chat vun TypingMind, an de Modell iwwerhëlt de Rescht. Den Numm an d'Beschreiwung stinn am System-Prompt. Soubal eng Ufro dozou passt, luet de Modell déi komplett Instruktioune selwer — Dir musst de Skill ni manuell opruffen, an et fale keng Token un, bis en tatsächlech benotzt gëtt.

De Modell luet Backup Restore automatesch, soubal eng Ufro dozou passt.

Funktionéiert mat all KI-Modell

KI-Skills si reng Markdown-Instruktiounen amplaz vun ubidderspezifeschem Code. Dofir ass Backup Restore net un de Modell gebonnen, fir deen de Skill geschriwwe gouf. Installéiert en eemol an TypingMind a benotzt e mat GPT-5, Claude, Gemini, Grok, DeepSeek, Mistral, Llama oder engem lokale Modell, deen Dir selwer bedreift — alles mat Ären eegenen API-Keys.

  • Gëtt nëmme gelueden, wann et néideg ass

    De System-Prompt enthält nëmmen den Numm an d'Beschreiwung. D'Instruktioune gi bei der éischter passender Ufro gelueden, soudatt en onbenotzte Skill näischt kascht.

  • De Modell am lafende Chat wiesselen

    Well de Skill aus Instruktiounen amplaz vu Code besteet, funktionéiert en och no engem Modellwiessel — den nächste Modell liest déi selwecht SKILL.md-Datei.

Skill-Instruktiounen

Dëst ass den Inhalt vu SKILL.md, deen de Modell luet. Liest e virun der Installatioun — e Skill besteet aus Instruktiounen, déi Äre Modell befollegt.

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).

Heefeg gestallte Froen

Wat mécht de KI-Skill 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...

Firwat Backup Restore op TypingMind benotzen?

Well Dir en eemol installéiert a mat all Modell benotze kënnt. Backup Restore besteet aus einfachem Markdown amplaz vun ubidderspezifeschem Code. Dee selwechte Skill funktionéiert also mat GPT-5, Claude, Gemini, Grok oder engem lokale Modell – an Dir kënnt de Modell matzen am Chat wiesselen, ouni datt de Skill ophält ze funktionéieren. TypingMind benotzt Är eegen API-Schlësselen, sou datt Dir d'Ubidder direkt bezuelt amplaz vun engem Abonnement pro Benotzerplaz. Är Skills a Chats bleiwen an Ärem eegene Späicher.

Wéi installéieren ech Backup Restore an TypingMind?

Maacht an TypingMind Plugins → Skills → Vu GitHub installéieren op a setzt https://github.com/serversathome/homelabhero/tree/main/ops/.claude/skills/backup-restore an. TypingMind liest d'Datei SKILL.md an installéiert de Skill, deen Dir pro Chat aktivéiere kënnt.

Wéi eng KI-Modeller kënnen Backup Restore benotzen?

All Modell, deen Dir an TypingMind verbënnt. KI-Skills sinn einfach Markdown-Instruktiounen an net ubidderspezifesche Code. Dofir kënne GPT, Claude, Gemini, Grok a lokal Modeller dëse Skill lueden, wann eng Ufro dozou passt.

Wéi vill KI-Modeller kann ech mat Backup Restore benotzen?

Esou vill Dir wëllt. Soulaang e Modell Skills ënnerstëtzt, kënnt Dir Backup Restore domat benotzen – GPT, Claude, Gemini, Grok, DeepSeek, Mistral, Llama a méi – alles op TypingMind mat Ären eegenen API-Schlësselen.

Ass de KI-Skill Backup Restore gratis?

De Skill gëtt vum serversathome op GitHub publizéiert. Kuckt am Repository no de Lizenzbedéngungen. Dir bezuelt nëmmen Ären eegene KI-Ubidder fir d'Token, déi Dir benotzt.

Wat si KI-Skills?

E KI-Skill ass e weiderverwendbaart Pak vun Instruktiounen, dat engem KI-Modell bäibréngt, wéi en eng bestëmmt Aufgab erfëllt. E follegt dem oppenen Agent Skills-Format: eng Datei SKILL.md mat engem Numm an enger Beschreiwung, plus all Scripten, Virlagen oder Referenzdateien, déi de Modell eventuell brauch. De Modell liest d'Instruktiounen eréischt, wann Är Ufro zum Skill passt. En installéierte Skill kascht also näischt, bis e benotzt gëtt.

Wéi ënnerscheede sech KI-Skills vu Plugins oder MCP-Serveren?

E Plugin oder MCP-Server gëtt engem Modell nei Tools, déi en opruffe kann – Code, deen iergendwou leeft an e Resultat zeréckgëtt. E KI-Skill gëtt dem Modell dogéint Wëssen an eng Virgoensweis: wéi en eng Aufgab ugeet, wéi eng Schrëtt en nokënnt a wéi eng gutt Ausgab ausgesäit. Skills bestinn aus einfachem Markdown, brauche kee Server, keen API-Schlëssel a keng Lafzäitëmfeld a funktionéiere mat all Modell.

All weisen

Elo Ären eegene KI-Workspace ariichten

Abonnéiert Iech op eisen Newsletter, fir iwwer nei Funktiounen an zukünfteg Gewënnspiller informéiert ze ginn 👇