[{"data":1,"prerenderedAt":-1},["ShallowReactive",2],{"skill:01M73BVR1BCC8XQ9H57DWCW111":3,"skill-same:01M73BVR1BCC8XQ9H57DWCW111":48},{"skillNo":4,"name":5,"nameZh":6,"description":7,"descriptionZh":6,"repositoryFullName":8,"ownerLogin":9,"ownerAvatarUrl":10,"ownerAccountNo":11,"ownerDisplayName":12,"repositoryNo":13,"starsCount":14,"licenseSpdxId":15,"licenseFileUrl":6,"sourceHtmlUrl":16,"categories":17,"keywords":18,"publishedAt":19,"linkOnly":20,"markdownContent":21,"markdownBody":22,"frontMatter":23,"refName":24,"commitSha":25,"skillDirectory":26,"forksCount":27,"repositoryHtmlUrl":28,"repositoryHomepageUrl":29,"ownerHtmlUrl":30,"ownerBlogUrl":31,"ownerDescription":32,"updatedAt":33,"install":34,"resources":47},"01M73BVR1BCC8XQ9H57DWCW111","backup-disaster-recovery",null,"Design backups that actually work when they are needed. Covers RPO and RTO definition, the 3-2-1 rule, encryption before leaving the host, ransomware-resistant immutable storage, restore drills, and the split between operational and legal retention. Invoke when 'we have backups but nobody has restored them' is true, after a near-miss, or before a major migration.","Horonomos-laps\u002FYana-AI","Horonomos-laps","https:\u002F\u002Favatars.githubusercontent.com\u002Fu\u002F355299122?v=4","01M76B3QPXE88ET2SQPDPVATZT"," Horonomos-laps","01M72ZQRJPCYPSSWT4D00VJR2A",13,"Apache-2.0","https:\u002F\u002Fgithub.com\u002FHoronomos-laps\u002FYana-AI\u002Fblob\u002Fmain\u002Fcore\u002Fskills\u002Fgw360--backup-disaster-recovery\u002FSKILL.md",[],[],"2026-11-11 15:11:14",false,"---\nname: backup-disaster-recovery\ndescription: Design backups that actually work when they are needed. Covers RPO and RTO definition, the 3-2-1 rule, encryption before leaving the host, ransomware-resistant immutable storage, restore drills, and the split between operational and legal retention. Invoke when 'we have backups but nobody has restored them' is true, after a near-miss, or before a major migration.\n---\n\n# Backups & Disaster Recovery\n\nThe line that defines a backup strategy: **\"a backup you have not restored is a wish, not a backup.\"** Most teams have something called \"backups\" that have never been restored end-to-end. Sometimes they don't actually work; sometimes they work but are too slow; sometimes they work but the team forgot a critical piece of state and ends up with a half-restored system.\n\nThis skill builds a strategy that survives the first real incident — not the strategy that looks good in a slide deck.\n\nPairs with [`incident-response`](..\u002Fincident-response\u002FSKILL.md) (where backups get used) and [`postgres-hardening`](..\u002Fpostgres-hardening\u002FSKILL.md) \u002F [`backend-architecture`](..\u002Fbackend-architecture\u002FSKILL.md) (where the data lives).\n\n## When to invoke\n\n- \"We have backups but nobody has ever restored them\"\n- Adding a new system that holds production data\n- After a near-miss (almost lost data) or an actual data-loss incident\n- Before a major migration, version upgrade, or refactor that touches storage\n- Ransomware attack in the news that affects your stack (always periodic, treat as a prompt)\n- Periodic re-audit (quarterly is reasonable)\n\n## Step 1 — Define what you're protecting against\n\nThe right strategy depends on the failure class. Backups for ransomware look different from backups for \"developer dropped the table accidentally.\"\n\n| Failure class | What you need |\n|---|---|\n| Hardware failure (disk, server) | Replica or snapshot in a different physical location |\n| Accidental delete (DROP TABLE, rm -rf, bad migration) | Point-in-time backup, retained N days |\n| Application bug corrupting data | Point-in-time backup + ability to surgically restore subsets |\n| Ransomware encrypting everything reachable from the app | Backups the ransomware cannot reach — immutable or offline |\n| Cloud-account compromise | Backups in a separate account \u002F provider, separate credentials |\n| Provider going under \u002F region outage | Backups in a different provider \u002F region |\n| Legal hold \u002F subpoena \u002F SAR request | Selective archive, retention policy that complies with your jurisdiction |\n| Force majeure (data center fire, country-level outage) | Off-region \u002F off-provider backups, restore plan that does not assume continuity |\n\nA real strategy covers at least the first four. Production systems with revenue at stake should cover the first six. Regulated environments cover all eight.\n\n## Step 2 — Define RPO and RTO\n\n**RPO (Recovery Point Objective)**: how much data can you afford to lose? Measured in time. RPO = 1 hour means you can lose up to the last hour of writes.\n\n**RTO (Recovery Time Objective)**: how long can you be down during recovery? RTO = 4 hours means a full restore must complete within four hours.\n\nThese two drive every other decision. A 1-minute RPO requires continuous replication; a 1-day RPO can be daily snapshots. A 5-minute RTO requires hot standby; a 24-hour RTO can be cold storage on a different provider.\n\nMost small-team production systems land at:\n\n- **RPO**: 1–24 hours\n- **RTO**: 4–24 hours\n\nPick yours. Write it down. Test against it.\n\n## Step 3 — The 3-2-1 rule\n\nThe classic backup mantra, still correct:\n\n- **3 copies** of the data (production + 2 backups)\n- **2 different media** (so a single failure mode does not affect both)\n- **1 off-site** (so a site-level disaster does not take everything)\n\nIn modern cloud terms:\n\n- **Production data**: managed Postgres \u002F Mongo \u002F S3 — copy 1\n- **Same-region backup**: provider's automated backups (e.g. RDS snapshots, R2 versioning) — copy 2, fast restore\n- **Off-site \u002F off-provider backup**: scheduled dump to a different provider \u002F different account — copy 3, slow but independent\n\nYou can extend (3-2-1-1-0: plus 1 immutable, 0 errors after restore test), but 3-2-1 is the minimum that survives realistic failures.\n\n## Step 4 — Encrypt every backup, end-to-end\n\nA leaked plaintext backup is a leaked database. Encrypt **before** the data leaves the production host, with a key the backup destination does not hold.\n\n```bash\n# pg_dump piped through compression + age encryption, then to off-site storage\npg_dump -Fc app_db \\\n  | gzip \\\n  | age -r age1q3...recipientpublickey... \\\n  > \u002Ftmp\u002Fapp_db-$(date +%F).sql.gz.age\n\n# Upload to off-provider storage (Cloudflare R2, B2, S3) with rclone\nrclone copy \u002Ftmp\u002Fapp_db-$(date +%F).sql.gz.age remote:backups\u002F\n```\n\nPatterns:\n\n- **`age`** (https:\u002F\u002Fage-encryption.org) is the modern simple choice — small binary, asymmetric, no PGP-keyring pain\n- **Public-key encryption** at the backup destination — the production host has the public key, the restore host (separate, secured) has the private key. Compromise of the production host does not compromise the ability to read past backups.\n- **Rotate encryption keys** periodically; keep retired keys long enough to decrypt all retained backups\n- **Test that you can decrypt** — a backup encrypted with a key you no longer have is useless\n\n## Step 5 — Make backups ransomware-resistant\n\nRansomware that compromises the production environment will look for backups to encrypt or delete next. Standard daily-rsync-to-NAS backups die in this scenario.\n\nDefenses:\n\n- **Immutable storage** — write-once, retention-locked. S3 Object Lock (Compliance mode), R2 Object Versioning + retention rules, Backblaze B2 with object lock. Once written, the object cannot be modified or deleted before the retention period expires — even by the account owner.\n- **Separate credentials** for the backup pipeline that have *write but not delete* permission on the backup bucket\n- **Separate account \u002F provider** so a credential leak in production cannot reach the backup destination\n- **Air-gapped weekly archives** for the strictest cases — periodic dumps onto offline media, manually rotated\n\nAvoid:\n\n- Backup destinations writable by the same credentials the app uses\n- \"Soft-delete\" features mistaken for immutability — they have an \"actually delete\" sibling\n- Backup processes that the app itself can pause \u002F disable\n\n## Step 6 — Restore drills (the part everyone skips)\n\nA backup you have not restored is not a backup. Schedule and execute drills.\n\n**Quarterly drill** (every team):\n\n1. Pick a backup at random from the last 90 days\n2. Restore it to a clean environment (not production)\n3. Verify data integrity — row counts, recent records present, schema matches\n4. Time the restore — record the actual RTO\n5. Document anything that went wrong\n\n**Annual full DR exercise** (production-critical systems):\n\n1. Simulate a full data loss scenario\n2. Restore production from off-site backup to a parallel environment\n3. Run the application end-to-end against the restored data\n4. Measure: how long did this take? What broke? What was missing?\n\nCommon findings from real drills:\n\n- Backups are present but the encryption key is on the same machine as the backup\n- Restore scripts assume tools (`pg_restore`, `mongorestore`) that are not installed on the restore host\n- Application secrets \u002F configuration are not backed up; restoring the DB does not get the app back\n- DNS \u002F certificates \u002F load-balancer config not in version control — recreating the running app from a DB dump takes days\n- \"Daily backups\" turn out to be daily for one DB and weekly for another, undocumented\n- Backup files have been silently failing for months — nobody monitored the cron output\n\n## Step 7 — Back up the things that aren't the database\n\nThe database is the most obvious. The less-obvious matters too:\n\n- **Object storage** — user uploads, generated files. Cloudflare R2 versioning, S3 versioning + lifecycle policies.\n- **Configuration \u002F secrets** — env vars, secret-manager contents. Export periodically (encrypted) so you can recreate without the original system.\n- **DNS \u002F certificates** — export DNS zones, document cert rotation. Losing a domain takes a service offline.\n- **CI\u002FCD configuration** — your `.github\u002Fworkflows\u002F`, deploy scripts. Live in the repo, but make sure the repo itself has off-platform backups (GitHub itself can lock you out).\n- **Email \u002F messaging history** — for legal-discovery readiness\n- **Documentation, runbooks, architecture diagrams** — if Notion \u002F Confluence vanishes, you need them\n- **Customer-facing state** — Stripe webhook subscriptions, third-party integrations. Document so you can recreate.\n\nThe \"everything else\" tier is often where the recovery time actually goes. The DB restore is 30 minutes; reconstructing the deploy pipeline from memory is 3 days.\n\n## Step 8 — Retention policies\n\nTwo different needs, two different policies:\n\n### Operational retention (for restoring)\n\nRoughly: more granular for recent, less for older.\n\n- **Hourly snapshots** for the last 24 hours\n- **Daily backups** for the last 30 days\n- **Weekly backups** for the last 12 weeks\n- **Monthly backups** for the last 12 months\n\nTune to your RPO and to the cost.\n\n### Legal retention (for compliance \u002F discovery)\n\nDifferent rules. Tax data: 10 years (DE\u002FAT). Some user data: only as long as needed under GDPR — see [`gdpr-technical-controls`](..\u002Fgdpr-technical-controls\u002FSKILL.md). Some data has affirmative deletion requirements (right to be forgotten, accounts closed).\n\nThese two policies conflict for personal data. The accepted approach: maintain a \"delete on restore\" pipeline so any restore re-applies deletion requests issued since the backup was taken. Document this in your privacy policy and DPA.\n\n## Step 9 — Automation and monitoring\n\nA backup process that requires manual action will silently break.\n\n```bash\n# Cron entry — daily at 03:00 UTC\n0 3 * * * \u002Fusr\u002Flocal\u002Fbin\u002Fbackup-app.sh 2>&1 | logger -t backup-app\n\n# In \u002Fusr\u002Flocal\u002Fbin\u002Fbackup-app.sh — exits non-zero on any failure,\n# pings a healthcheck URL on success (so absence is itself an alert)\nset -euo pipefail\nTIMESTAMP=$(date +%Y-%m-%d-%H%M%S)\nBACKUP_PATH=\u002Ftmp\u002Fapp_db-$TIMESTAMP.sql.gz.age\n\npg_dump -Fc app_db | gzip | age -r \"$AGE_RECIPIENT\" > \"$BACKUP_PATH\"\nrclone copy \"$BACKUP_PATH\" remote:backups\u002F --no-traverse\nrm \"$BACKUP_PATH\"\n\n# Healthcheck — https:\u002F\u002Fhealthchecks.io \u002F Better Stack heartbeats \u002F your monitoring\ncurl -fsS -m 10 --retry 3 \"$HEARTBEAT_URL\"\n```\n\nMonitor:\n\n- **Last successful backup timestamp** — alert if older than RPO + grace\n- **Backup file size** — alert if it deviates significantly from baseline (small ⇒ broken; huge ⇒ unexpected growth or compromise)\n- **Restore-drill date** — alert if more than 90 days since last drill\n\nA heartbeat-based pattern catches more failures than a \"got an alert on error\" pattern. If the cron job died entirely, error-alerts never fire; absence does.\n\n## Step 10 — Document the recovery procedure\n\nIn a place that exists when production is gone:\n\n- **A printed copy** or copy on a phone you can read offline\n- **A repo you can clone outside the affected infrastructure**\n- **A document in a personal email \u002F drive that does not depend on company SSO**\n\nShould answer:\n\n- Who has the keys to do the restore?\n- Where is each backup stored? What credentials do you need?\n- What's the exact command sequence to restore? (Tested in your last drill.)\n- What infrastructure must exist first (DNS, DB instance, secrets)?\n- What's the order of operations if multiple systems are down?\n- Who do you notify, when?\n\nA good recovery doc is the result of a real drill, not theory.\n\n## Step 11 — Special cases\n\n### Database snapshots vs `pg_dump`\n\nBoth have a place. Cloud-provider snapshots are fast to restore but tied to the provider. Logical dumps (`pg_dump`, `mongodump`) are slower but portable to any environment. Run both. Cloud snapshots for fast intra-provider restore; off-provider logical dumps for the bad-day scenario.\n\n### S3 \u002F object-storage backups\n\nS3 versioning + lifecycle is the easy path. With versioning on, deleted objects can be restored by removing the delete marker. Lifecycle policies move old versions to cheaper storage.\n\nBut: versioning is account-internal. A compromised account credential can still delete versions (unless Object Lock is on). For ransomware resistance, mirror to a separate account \u002F provider.\n\n### Backing up an entire VPS\n\nFor self-hosted single-VPS deployments, provider-level snapshots are the right complement to app-level backups. They capture *everything* — DB, files, config — at one moment. They're not granular for \"restore one row\" but they're great for \"restore the whole machine.\"\n\nRestore at least one VPS snapshot per quarter to verify the provider's snapshot mechanism works for your case.\n\n### Backup of backups?\n\nFor high-stakes data, yes. A weekly export from the primary backup destination to a tertiary location. Three's the magic number; rarely worth four.\n\n## Checklist — production-ready backup strategy\n\n- [ ] RPO and RTO are written down and known to the team\n- [ ] At least 3 copies of the data, on 2 media, with 1 off-site (or off-provider)\n- [ ] Backups are encrypted before leaving the production host\n- [ ] Encryption keys are not on the same machine as the backups\n- [ ] Backup destination has write-but-not-delete permission for the backup pipeline, or uses Object Lock\n- [ ] An off-provider \u002F off-account copy exists for ransomware resistance\n- [ ] Backups happen via automation, with heartbeat monitoring\n- [ ] Last successful backup timestamp is monitored — alert if older than RPO + grace\n- [ ] Restore drills are scheduled quarterly; results documented\n- [ ] Full DR exercise scheduled annually for production-critical systems\n- [ ] Object storage (uploads), configuration, secrets, DNS, certificates are also backed up\n- [ ] Retention policy distinguishes operational from legal needs; deletion-on-restore handled\n- [ ] Recovery procedure is documented in a place that survives production loss\n- [ ] At least one team member other than the original implementer can perform the restore\n\n## What this skill will not do\n\n- Help recover data from systems you do not own\n- Recommend backup strategies that store production credentials at the backup destination\n- Substitute for a regulated-environment DR program with auditor-defined requirements\n","# Backups & Disaster Recovery\n\nThe line that defines a backup strategy: **\"a backup you have not restored is a wish, not a backup.\"** Most teams have something called \"backups\" that have never been restored end-to-end. Sometimes they don't actually work; sometimes they work but are too slow; sometimes they work but the team forgot a critical piece of state and ends up with a half-restored system.\n\nThis skill builds a strategy that survives the first real incident — not the strategy that looks good in a slide deck.\n\nPairs with [`incident-response`](..\u002Fincident-response\u002FSKILL.md) (where backups get used) and [`postgres-hardening`](..\u002Fpostgres-hardening\u002FSKILL.md) \u002F [`backend-architecture`](..\u002Fbackend-architecture\u002FSKILL.md) (where the data lives).\n\n## When to invoke\n\n- \"We have backups but nobody has ever restored them\"\n- Adding a new system that holds production data\n- After a near-miss (almost lost data) or an actual data-loss incident\n- Before a major migration, version upgrade, or refactor that touches storage\n- Ransomware attack in the news that affects your stack (always periodic, treat as a prompt)\n- Periodic re-audit (quarterly is reasonable)\n\n## Step 1 — Define what you're protecting against\n\nThe right strategy depends on the failure class. Backups for ransomware look different from backups for \"developer dropped the table accidentally.\"\n\n| Failure class | What you need |\n|---|---|\n| Hardware failure (disk, server) | Replica or snapshot in a different physical location |\n| Accidental delete (DROP TABLE, rm -rf, bad migration) | Point-in-time backup, retained N days |\n| Application bug corrupting data | Point-in-time backup + ability to surgically restore subsets |\n| Ransomware encrypting everything reachable from the app | Backups the ransomware cannot reach — immutable or offline |\n| Cloud-account compromise | Backups in a separate account \u002F provider, separate credentials |\n| Provider going under \u002F region outage | Backups in a different provider \u002F region |\n| Legal hold \u002F subpoena \u002F SAR request | Selective archive, retention policy that complies with your jurisdiction |\n| Force majeure (data center fire, country-level outage) | Off-region \u002F off-provider backups, restore plan that does not assume continuity |\n\nA real strategy covers at least the first four. Production systems with revenue at stake should cover the first six. Regulated environments cover all eight.\n\n## Step 2 — Define RPO and RTO\n\n**RPO (Recovery Point Objective)**: how much data can you afford to lose? Measured in time. RPO = 1 hour means you can lose up to the last hour of writes.\n\n**RTO (Recovery Time Objective)**: how long can you be down during recovery? RTO = 4 hours means a full restore must complete within four hours.\n\nThese two drive every other decision. A 1-minute RPO requires continuous replication; a 1-day RPO can be daily snapshots. A 5-minute RTO requires hot standby; a 24-hour RTO can be cold storage on a different provider.\n\nMost small-team production systems land at:\n\n- **RPO**: 1–24 hours\n- **RTO**: 4–24 hours\n\nPick yours. Write it down. Test against it.\n\n## Step 3 — The 3-2-1 rule\n\nThe classic backup mantra, still correct:\n\n- **3 copies** of the data (production + 2 backups)\n- **2 different media** (so a single failure mode does not affect both)\n- **1 off-site** (so a site-level disaster does not take everything)\n\nIn modern cloud terms:\n\n- **Production data**: managed Postgres \u002F Mongo \u002F S3 — copy 1\n- **Same-region backup**: provider's automated backups (e.g. RDS snapshots, R2 versioning) — copy 2, fast restore\n- **Off-site \u002F off-provider backup**: scheduled dump to a different provider \u002F different account — copy 3, slow but independent\n\nYou can extend (3-2-1-1-0: plus 1 immutable, 0 errors after restore test), but 3-2-1 is the minimum that survives realistic failures.\n\n## Step 4 — Encrypt every backup, end-to-end\n\nA leaked plaintext backup is a leaked database. Encrypt **before** the data leaves the production host, with a key the backup destination does not hold.\n\n```bash\n# pg_dump piped through compression + age encryption, then to off-site storage\npg_dump -Fc app_db \\\n  | gzip \\\n  | age -r age1q3...recipientpublickey... \\\n  > \u002Ftmp\u002Fapp_db-$(date +%F).sql.gz.age\n\n# Upload to off-provider storage (Cloudflare R2, B2, S3) with rclone\nrclone copy \u002Ftmp\u002Fapp_db-$(date +%F).sql.gz.age remote:backups\u002F\n```\n\nPatterns:\n\n- **`age`** (https:\u002F\u002Fage-encryption.org) is the modern simple choice — small binary, asymmetric, no PGP-keyring pain\n- **Public-key encryption** at the backup destination — the production host has the public key, the restore host (separate, secured) has the private key. Compromise of the production host does not compromise the ability to read past backups.\n- **Rotate encryption keys** periodically; keep retired keys long enough to decrypt all retained backups\n- **Test that you can decrypt** — a backup encrypted with a key you no longer have is useless\n\n## Step 5 — Make backups ransomware-resistant\n\nRansomware that compromises the production environment will look for backups to encrypt or delete next. Standard daily-rsync-to-NAS backups die in this scenario.\n\nDefenses:\n\n- **Immutable storage** — write-once, retention-locked. S3 Object Lock (Compliance mode), R2 Object Versioning + retention rules, Backblaze B2 with object lock. Once written, the object cannot be modified or deleted before the retention period expires — even by the account owner.\n- **Separate credentials** for the backup pipeline that have *write but not delete* permission on the backup bucket\n- **Separate account \u002F provider** so a credential leak in production cannot reach the backup destination\n- **Air-gapped weekly archives** for the strictest cases — periodic dumps onto offline media, manually rotated\n\nAvoid:\n\n- Backup destinations writable by the same credentials the app uses\n- \"Soft-delete\" features mistaken for immutability — they have an \"actually delete\" sibling\n- Backup processes that the app itself can pause \u002F disable\n\n## Step 6 — Restore drills (the part everyone skips)\n\nA backup you have not restored is not a backup. Schedule and execute drills.\n\n**Quarterly drill** (every team):\n\n1. Pick a backup at random from the last 90 days\n2. Restore it to a clean environment (not production)\n3. Verify data integrity — row counts, recent records present, schema matches\n4. Time the restore — record the actual RTO\n5. Document anything that went wrong\n\n**Annual full DR exercise** (production-critical systems):\n\n1. Simulate a full data loss scenario\n2. Restore production from off-site backup to a parallel environment\n3. Run the application end-to-end against the restored data\n4. Measure: how long did this take? What broke? What was missing?\n\nCommon findings from real drills:\n\n- Backups are present but the encryption key is on the same machine as the backup\n- Restore scripts assume tools (`pg_restore`, `mongorestore`) that are not installed on the restore host\n- Application secrets \u002F configuration are not backed up; restoring the DB does not get the app back\n- DNS \u002F certificates \u002F load-balancer config not in version control — recreating the running app from a DB dump takes days\n- \"Daily backups\" turn out to be daily for one DB and weekly for another, undocumented\n- Backup files have been silently failing for months — nobody monitored the cron output\n\n## Step 7 — Back up the things that aren't the database\n\nThe database is the most obvious. The less-obvious matters too:\n\n- **Object storage** — user uploads, generated files. Cloudflare R2 versioning, S3 versioning + lifecycle policies.\n- **Configuration \u002F secrets** — env vars, secret-manager contents. Export periodically (encrypted) so you can recreate without the original system.\n- **DNS \u002F certificates** — export DNS zones, document cert rotation. Losing a domain takes a service offline.\n- **CI\u002FCD configuration** — your `.github\u002Fworkflows\u002F`, deploy scripts. Live in the repo, but make sure the repo itself has off-platform backups (GitHub itself can lock you out).\n- **Email \u002F messaging history** — for legal-discovery readiness\n- **Documentation, runbooks, architecture diagrams** — if Notion \u002F Confluence vanishes, you need them\n- **Customer-facing state** — Stripe webhook subscriptions, third-party integrations. Document so you can recreate.\n\nThe \"everything else\" tier is often where the recovery time actually goes. The DB restore is 30 minutes; reconstructing the deploy pipeline from memory is 3 days.\n\n## Step 8 — Retention policies\n\nTwo different needs, two different policies:\n\n### Operational retention (for restoring)\n\nRoughly: more granular for recent, less for older.\n\n- **Hourly snapshots** for the last 24 hours\n- **Daily backups** for the last 30 days\n- **Weekly backups** for the last 12 weeks\n- **Monthly backups** for the last 12 months\n\nTune to your RPO and to the cost.\n\n### Legal retention (for compliance \u002F discovery)\n\nDifferent rules. Tax data: 10 years (DE\u002FAT). Some user data: only as long as needed under GDPR — see [`gdpr-technical-controls`](..\u002Fgdpr-technical-controls\u002FSKILL.md). Some data has affirmative deletion requirements (right to be forgotten, accounts closed).\n\nThese two policies conflict for personal data. The accepted approach: maintain a \"delete on restore\" pipeline so any restore re-applies deletion requests issued since the backup was taken. Document this in your privacy policy and DPA.\n\n## Step 9 — Automation and monitoring\n\nA backup process that requires manual action will silently break.\n\n```bash\n# Cron entry — daily at 03:00 UTC\n0 3 * * * \u002Fusr\u002Flocal\u002Fbin\u002Fbackup-app.sh 2>&1 | logger -t backup-app\n\n# In \u002Fusr\u002Flocal\u002Fbin\u002Fbackup-app.sh — exits non-zero on any failure,\n# pings a healthcheck URL on success (so absence is itself an alert)\nset -euo pipefail\nTIMESTAMP=$(date +%Y-%m-%d-%H%M%S)\nBACKUP_PATH=\u002Ftmp\u002Fapp_db-$TIMESTAMP.sql.gz.age\n\npg_dump -Fc app_db | gzip | age -r \"$AGE_RECIPIENT\" > \"$BACKUP_PATH\"\nrclone copy \"$BACKUP_PATH\" remote:backups\u002F --no-traverse\nrm \"$BACKUP_PATH\"\n\n# Healthcheck — https:\u002F\u002Fhealthchecks.io \u002F Better Stack heartbeats \u002F your monitoring\ncurl -fsS -m 10 --retry 3 \"$HEARTBEAT_URL\"\n```\n\nMonitor:\n\n- **Last successful backup timestamp** — alert if older than RPO + grace\n- **Backup file size** — alert if it deviates significantly from baseline (small ⇒ broken; huge ⇒ unexpected growth or compromise)\n- **Restore-drill date** — alert if more than 90 days since last drill\n\nA heartbeat-based pattern catches more failures than a \"got an alert on error\" pattern. If the cron job died entirely, error-alerts never fire; absence does.\n\n## Step 10 — Document the recovery procedure\n\nIn a place that exists when production is gone:\n\n- **A printed copy** or copy on a phone you can read offline\n- **A repo you can clone outside the affected infrastructure**\n- **A document in a personal email \u002F drive that does not depend on company SSO**\n\nShould answer:\n\n- Who has the keys to do the restore?\n- Where is each backup stored? What credentials do you need?\n- What's the exact command sequence to restore? (Tested in your last drill.)\n- What infrastructure must exist first (DNS, DB instance, secrets)?\n- What's the order of operations if multiple systems are down?\n- Who do you notify, when?\n\nA good recovery doc is the result of a real drill, not theory.\n\n## Step 11 — Special cases\n\n### Database snapshots vs `pg_dump`\n\nBoth have a place. Cloud-provider snapshots are fast to restore but tied to the provider. Logical dumps (`pg_dump`, `mongodump`) are slower but portable to any environment. Run both. Cloud snapshots for fast intra-provider restore; off-provider logical dumps for the bad-day scenario.\n\n### S3 \u002F object-storage backups\n\nS3 versioning + lifecycle is the easy path. With versioning on, deleted objects can be restored by removing the delete marker. Lifecycle policies move old versions to cheaper storage.\n\nBut: versioning is account-internal. A compromised account credential can still delete versions (unless Object Lock is on). For ransomware resistance, mirror to a separate account \u002F provider.\n\n### Backing up an entire VPS\n\nFor self-hosted single-VPS deployments, provider-level snapshots are the right complement to app-level backups. They capture *everything* — DB, files, config — at one moment. They're not granular for \"restore one row\" but they're great for \"restore the whole machine.\"\n\nRestore at least one VPS snapshot per quarter to verify the provider's snapshot mechanism works for your case.\n\n### Backup of backups?\n\nFor high-stakes data, yes. A weekly export from the primary backup destination to a tertiary location. Three's the magic number; rarely worth four.\n\n## Checklist — production-ready backup strategy\n\n- [ ] RPO and RTO are written down and known to the team\n- [ ] At least 3 copies of the data, on 2 media, with 1 off-site (or off-provider)\n- [ ] Backups are encrypted before leaving the production host\n- [ ] Encryption keys are not on the same machine as the backups\n- [ ] Backup destination has write-but-not-delete permission for the backup pipeline, or uses Object Lock\n- [ ] An off-provider \u002F off-account copy exists for ransomware resistance\n- [ ] Backups happen via automation, with heartbeat monitoring\n- [ ] Last successful backup timestamp is monitored — alert if older than RPO + grace\n- [ ] Restore drills are scheduled quarterly; results documented\n- [ ] Full DR exercise scheduled annually for production-critical systems\n- [ ] Object storage (uploads), configuration, secrets, DNS, certificates are also backed up\n- [ ] Retention policy distinguishes operational from legal needs; deletion-on-restore handled\n- [ ] Recovery procedure is documented in a place that survives production loss\n- [ ] At least one team member other than the original implementer can perform the restore\n\n## What this skill will not do\n\n- Help recover data from systems you do not own\n- Recommend backup strategies that store production credentials at the backup destination\n- Substitute for a regulated-environment DR program with auditor-defined requirements\n",{"name":5,"description":7},"main","481dcd7dd2e288b9d627a2bd017db70e64e6c6fa","core\u002Fskills\u002Fgw360--backup-disaster-recovery",2,"https:\u002F\u002Fgithub.com\u002FHoronomos-laps\u002FYana-AI","https:\u002F\u002Fyana.vutam.link\u002F","https:\u002F\u002Fgithub.com\u002FHoronomos-laps","https:\u002F\u002Fyana.vutam.link","An open-source governed runtime & execution environment for multi-agent AI systems.","2026-11-14 13:24:09",{"source":8,"skillName":5,"commands":35,"prompt":45,"zipAvailable":46},[36,39,42],{"tool":37,"command":38},"npx","npx skills add Horonomos-laps\u002FYana-AI --skill backup-disaster-recovery",{"tool":40,"command":41},"bunx","bunx skills add Horonomos-laps\u002FYana-AI --skill backup-disaster-recovery",{"tool":43,"command":44},"pnpm","pnpm dlx skills add Horonomos-laps\u002FYana-AI --skill backup-disaster-recovery","安装技能，技能地址：https:\u002F\u002Fgithub.com\u002FHoronomos-laps\u002FYana-AI\u002Fblob\u002Fmain\u002Fcore\u002Fskills\u002Fgw360--backup-disaster-recovery\u002FSKILL.md",true,[],[49,57,64,72,80,88],{"skillNo":50,"name":51,"nameZh":6,"description":52,"descriptionZh":6,"repositoryFullName":8,"ownerLogin":9,"ownerAvatarUrl":10,"ownerAccountNo":11,"ownerDisplayName":12,"repositoryNo":13,"starsCount":14,"licenseSpdxId":53,"licenseFileUrl":6,"sourceHtmlUrl":54,"categories":55,"keywords":56,"publishedAt":19},"01M735GKET5YVYKAY62W2P5YXB","openai--sentry--sentry","Use when the user asks to inspect Sentry issues or events, summarize recent production errors, or pull basic Sentry health data via the Sentry API; perform read-only queries with the bundled script and require `SENTRY_AUTH_TOKEN`.","MIT","https:\u002F\u002Fgithub.com\u002FHoronomos-laps\u002FYana-AI\u002Fblob\u002Fmain\u002F.claude\u002Fskills\u002Fopenai--sentry--sentry\u002FSKILL.md",[],[],{"skillNo":58,"name":59,"nameZh":6,"description":60,"descriptionZh":6,"repositoryFullName":8,"ownerLogin":9,"ownerAvatarUrl":10,"ownerAccountNo":11,"ownerDisplayName":12,"repositoryNo":13,"starsCount":14,"licenseSpdxId":15,"licenseFileUrl":6,"sourceHtmlUrl":61,"categories":62,"keywords":63,"publishedAt":19},"01M73DCAP83T17HY7SMGK7MGFE","ito-basket-compare","Compare Itô prediction-market baskets against a user's knowledge base, portfolio notes, financial context, watchlist, or research thesis. Use for read-only basket comparison and gap analysis without investment advice or live trading.","https:\u002F\u002Fgithub.com\u002FHoronomos-laps\u002FYana-AI\u002Fblob\u002Fmain\u002Fcore\u002Fskills\u002Fito-basket-compare\u002FSKILL.md",[],[],{"skillNo":65,"name":66,"nameZh":6,"description":67,"descriptionZh":6,"repositoryFullName":8,"ownerLogin":9,"ownerAvatarUrl":10,"ownerAccountNo":11,"ownerDisplayName":12,"repositoryNo":13,"starsCount":14,"licenseSpdxId":15,"licenseFileUrl":68,"sourceHtmlUrl":69,"categories":70,"keywords":71,"publishedAt":19},"01M734CYEMZFDR3KH6SW0JP8TD","implementing-network-traffic-baselining","Build network traffic baselines from NetFlow\u002FIPFIX data using Python pandas for statistical analysis, z-score anomaly detection, and hourly\u002Fdaily traffic pattern profiling","https:\u002F\u002Fgithub.com\u002Fyanacuti1121\u002FYana-AI\u002Fblob\u002Fmain\u002F.claude\u002Fskills\u002Fimplementing-network-traffic-baselining\u002FLICENSE","https:\u002F\u002Fgithub.com\u002FHoronomos-laps\u002FYana-AI\u002Fblob\u002Fmain\u002F.claude\u002Fskills\u002Fimplementing-network-traffic-baselining\u002FSKILL.md",[],[],{"skillNo":73,"name":74,"nameZh":6,"description":75,"descriptionZh":6,"repositoryFullName":8,"ownerLogin":9,"ownerAvatarUrl":10,"ownerAccountNo":11,"ownerDisplayName":12,"repositoryNo":13,"starsCount":14,"licenseSpdxId":15,"licenseFileUrl":76,"sourceHtmlUrl":77,"categories":78,"keywords":79,"publishedAt":19},"01M73ASZ6NJRJM44Z2P84NGQ3Q","detecting-evasion-techniques-in-endpoint-logs","Detects defense evasion techniques used by adversaries in endpoint logs including log tampering, timestomping, process injection, and security tool disabling. Use when investigating suspicious endpoint behavior, building detection rules for evasion tactics, or conducting threat hunting for stealthy adversary activity. Activates for requests involving evasion detection, defense evasion analysis, log tampering detection, or MITRE ATT&CK TA0005.","https:\u002F\u002Fgithub.com\u002Fyanacuti1121\u002FYana-AI\u002Fblob\u002Fmain\u002Fcore\u002Fskills\u002Fdetecting-evasion-techniques-in-endpoint-logs\u002FLICENSE","https:\u002F\u002Fgithub.com\u002FHoronomos-laps\u002FYana-AI\u002Fblob\u002Fmain\u002Fcore\u002Fskills\u002Fdetecting-evasion-techniques-in-endpoint-logs\u002FSKILL.md",[],[],{"skillNo":81,"name":82,"nameZh":6,"description":83,"descriptionZh":6,"repositoryFullName":8,"ownerLogin":9,"ownerAvatarUrl":10,"ownerAccountNo":11,"ownerDisplayName":12,"repositoryNo":13,"starsCount":14,"licenseSpdxId":15,"licenseFileUrl":84,"sourceHtmlUrl":85,"categories":86,"keywords":87,"publishedAt":19},"01M734AFNXD06Z78QRK0VKGT7Q","implementing-microsegmentation-with-guardicore","Implementing microsegmentation using Akamai Guardicore Segmentation to map application dependencies, create granular network policies, visualize east-west traffic flows, and enforce least-privilege communication between workloads across data centers and cloud.","https:\u002F\u002Fgithub.com\u002Fyanacuti1121\u002FYana-AI\u002Fblob\u002Fmain\u002F.claude\u002Fskills\u002Fimplementing-microsegmentation-with-guardicore\u002FLICENSE","https:\u002F\u002Fgithub.com\u002FHoronomos-laps\u002FYana-AI\u002Fblob\u002Fmain\u002F.claude\u002Fskills\u002Fimplementing-microsegmentation-with-guardicore\u002FSKILL.md",[],[],{"skillNo":89,"name":90,"nameZh":6,"description":6,"descriptionZh":6,"repositoryFullName":8,"ownerLogin":9,"ownerAvatarUrl":10,"ownerAccountNo":11,"ownerDisplayName":12,"repositoryNo":13,"starsCount":14,"licenseSpdxId":15,"licenseFileUrl":6,"sourceHtmlUrl":91,"categories":92,"keywords":93,"publishedAt":19},"01M736TK27QMCXK0DVCH25SJN5","ramdisk-tmpfs-patterns","https:\u002F\u002Fgithub.com\u002FHoronomos-laps\u002FYana-AI\u002Fblob\u002Fmain\u002F.claude\u002Fskills\u002Framdisk-tmpfs-patterns\u002FSKILL.md",[],[]]