شعار 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 يُحمّله النموذج عند الحاجة، فلا يستهلك توكنات إلا عندما يَرِد طلب ذو صلة فعلًا.

  • تعمل مع أي نموذج لغوي كبير

    مهارات الذكاء الاصطناعي مكتوبة بصيغة Markdown وليست شيفرة خاصة بمزوّد معيّن، لذا تعمل مع GPT أو Claude أو Gemini أو Grok أو نموذج محلي.

  • مكتفية بذاتها

    كل ما يحتاجه النموذج موجود في التعليمات — لا ملفات إضافية لمزامنتها.

  • مفتوحة المصدر

    نشرها serversathome على GitHub. اطّلع على المصدر قبل تثبيتها.

التثبيت

ثبّت مهارة الذكاء الاصطناعي Backup Restore في TypingMind لاستخدامها مع أي نموذج لغوي كبير، أو أضفها إلى وكيل ذكاء اصطناعي آخر يقرأ SKILL.md.

1

التثبيت في TypingMind

يُثبّت TypingMind المهارة مباشرةً من مجلدها على GitHub — فيقرأ SKILL.md، ويجمع ملفات الموارد في حزمة، ويحفظ النتيجة محليًا.

  1. افتح التطبيق وانتقل إلى «الإضافات» ثم «المهارات».
  2. اختر «تثبيت من GitHub».
  3. الصق رابط مجلد المهارة الموضّح أدناه وأكّد التثبيت.
    https://github.com/serversathome/homelabhero/tree/main/ops/.claude/skills/backup-restore
  4. فعّل المهارة في كل محادثة تريد إتاحتها فيها.
الإضافات ← المهارات ← إضافة مهارة ← من رابط GitHub، ثم الصق رابط المجلد واضغط على «متابعة».
2

التثبيت في وكيل ذكاء اصطناعي آخر

يمكن لأي وكيل ذكاء اصطناعي يقرأ تنسيق Agent Skills استخدام هذه المهارة — انسخ المجلد إلى مجلد المهارات الخاص بذلك الوكيل.

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

فعّل Backup Restore في أي محادثة على TypingMind وسيتولى النموذج الباقي. تتضمن مطالبة النظام اسمها ووصفها، وبمجرد ورود طلب ذي صلة، يُحمّل النموذج التعليمات الكاملة تلقائيًا — فلا تحتاج إلى استدعائها يدويًا، ولا تستهلك أي توكنات حتى تُستخدم فعليًا.

يُحمّل النموذج مهارة Backup Restore تلقائيًا بمجرد ورود طلب ذي صلة بها.

تعمل مع أي نموذج ذكاء اصطناعي

مهارات الذكاء الاصطناعي هي تعليمات بصيغة Markdown وليست شيفرة خاصة بمزوّد معيّن، لذا لا ترتبط Backup Restore بالنموذج الذي كُتبت له. ثبّتها مرة واحدة في TypingMind واستخدمها مع GPT-5 أو Claude أو Gemini أو Grok أو DeepSeek أو Mistral أو Llama أو نموذج محلي تشغّله بنفسك — كل ذلك باستخدام مفاتيح API الخاصة بك.

  • تُحمَّل عند الحاجة فقط

    تتضمن مطالبة النظام الاسم والوصف فقط. وتُجلب التعليمات عند أول طلب ذي صلة، لذا لا تستهلك تعليمات المهارة أي توكنات ما دامت المهارة غير مستخدمة.

  • بدّل النماذج أثناء المحادثة

    لأن المهارة تعليمات وليست شيفرة، فإن تغيير النموذج لا يعطّلها — فالنموذج التالي يقرأ ملف 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).

الأسئلة الشائعة

ماذا تفعل مهارة الذكاء الاصطناعي 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...

لماذا تستخدم Backup Restore على TypingMind؟

لأنك تثبّتها مرة واحدة وتستخدمها مع أي نموذج. مهارة Backup Restore عبارة عن نص Markdown وليست شيفرة خاصة بمزود بعينه، لذا تعمل المهارة نفسها مع GPT-5 أو Claude أو Gemini أو Grok أو نموذج محلي، ويمكنك تبديل النموذج أثناء المحادثة دون تعطّل المهارة. يعمل TypingMind بمفاتيح API الخاصة بك، فتدفع للمزودين مباشرةً بدلًا من اشتراك لكل مقعد، وتبقى مهاراتك ومحادثاتك في مساحة التخزين الخاصة بك.

كيف أثبّت Backup Restore في TypingMind؟

في TypingMind، افتح «الإضافات»، ثم «المهارات»، ثم اختر «التثبيت من GitHub» والصق https://github.com/serversathome/homelabhero/tree/main/ops/.claude/skills/backup-restore. يقرأ TypingMind ملف SKILL.md الخاص بالمهارة ويثبّتها كمهارة يمكنك تفعيلها لكل محادثة على حدة.

ما نماذج الذكاء الاصطناعي التي يمكنها استخدام Backup Restore؟

أي نموذج تربطه في TypingMind. مهارات الذكاء الاصطناعي عبارة عن تعليمات Markdown وليست شيفرة خاصة بمزود بعينه، لذا يمكن لكل من GPT وClaude وGemini وGrok والنماذج المحلية تحميل هذه المهارة عندما يتوافق الطلب معها.

كم نموذج ذكاء اصطناعي يمكنني استخدامه مع Backup Restore؟

أي عدد تريده. ما دام النموذج يدعم المهارات، يمكنك استخدام Backup Restore معه، سواء كان GPT أو Claude أو Gemini أو Grok أو DeepSeek أو Mistral أو Llama أو غيرها، وكل ذلك على TypingMind باستخدام مفاتيح API الخاصة بك.

هل مهارة الذكاء الاصطناعي Backup Restore مجانية؟

نشرها serversathome على GitHub. راجع المستودع للاطلاع على شروط الترخيص. لا تدفع إلا لمزود الذكاء الاصطناعي الخاص بك مقابل التوكنات التي تستخدمها.

ما هي مهارات الذكاء الاصطناعي؟

مهارة الذكاء الاصطناعي حزمة تعليمات قابلة لإعادة الاستخدام تعلّم نموذج الذكاء الاصطناعي كيفية تنفيذ مهمة محددة. وتتبع تنسيق Agent Skills المفتوح: ملف SKILL.md يتضمن اسمًا ووصفًا، إلى جانب أي نصوص برمجية أو قوالب أو ملفات مرجعية قد يحتاج إليها النموذج. لا يقرأ النموذج التعليمات إلا عندما يتوافق طلبك مع المهارة، لذا لا تترتب على المهارة المثبتة أي تكلفة حتى تُستخدم.

كيف تختلف مهارات الذكاء الاصطناعي عن الإضافات أو موصلات MCP؟

تمنح الإضافة أو موصل MCP النموذج أدوات جديدة يمكنه استدعاؤها، وهي شيفرة تُنفَّذ في مكان ما وتُرجع نتيجة. أما مهارة الذكاء الاصطناعي فتزوّد النموذج بالمعرفة ومنهجية العمل: كيفية التعامل مع مهمة، والخطوات التي ينبغي اتباعها، وما ينبغي أن تكون عليه المخرجات الجيدة. المهارات عبارة عن نصوص Markdown، لذا لا تحتاج إلى خادم أو مفتاح API أو بيئة تشغيل، وتعمل مع أي نموذج.

عرض الكل

أنشئ مساحة عملك للذكاء الاصطناعي الآن

اشترك في نشرتنا الإخبارية لتصلك أخبار الميزات الجديدة والهدايا القادمة 👇