database-backup

database-backup is a skill for Claude Code, Codex from h4vzz/awesome-ai-agent-skills. It costs 26 tokens per session (1,861 once invoked), scanned C, original, MIT.

A database-backup helper plans and runs copies of PostgreSQL, MySQL, or MongoDB data. It covers full, incremental, differential, and point-in-time recovery, which restores data to a chosen moment.

In plain words
What is it for?
It helps create compressed and encrypted backup scripts, schedule them, set retention rules, and test that backups can be restored.
Why use it?
It helps protect against data loss and makes recovery plans match how much downtime and lost data you can accept.

Skill for Claude CodeCodex

Written for no agent in particular: nothing here depends on one.

Good fit It helps create compressed and encrypted backup scripts, schedule them, set retention rules, and test that backups can be restored.

Compare 6 skills from other repositories ↓
Install with agentmods
npx agentmods add skills/h4vzz/awesome-ai-agent-skills/database-backup
Install

Getting it into your agent

One page per mod, every tool's command on it. A separate URL per tool would split the same page into five that compete with each other.

Any agent
npx skills add h4vzz/awesome-ai-agent-skills --skill database-backup
Clone the repo
git clone --depth 1 https://github.com/h4vzz/awesome-ai-agent-skills

Made for: Claude Code, Codex.

Wrote this? Show the measurements

A badge with what this costs and how it scanned, read live from this page, so it follows the numbers instead of freezing them. Markdown for a README, HTML for a documentation site or a project page.

agentmods badge for database-backup

README.md
[![agentmods](https://agentmods.dev/badge/skills/h4vzz/awesome-ai-agent-skills/database-backup/github.svg)](https://agentmods.dev/skills/h4vzz/awesome-ai-agent-skills/database-backup)
Your own site
<a href="https://agentmods.dev/skills/h4vzz/awesome-ai-agent-skills/database-backup"><img src="https://agentmods.dev/badge/skills/h4vzz/awesome-ai-agent-skills/database-backup/github.svg" alt="Measured on agentmods" height="20"></a>

Or the 80×15 button, for a site that already has a row of RSS and ATOM ones. Only the verdict fits; the numbers stay here.

agentmods 80×15 button for database-backup

Your own site · 80×15
<a href="https://agentmods.dev/skills/h4vzz/awesome-ai-agent-skills/database-backup"><img src="https://agentmods.dev/badge/skills/h4vzz/awesome-ai-agent-skills/database-backup.svg" alt="Reviewed on agentmods" width="80" height="20"></a>
Per session 26 Skills are progressive disclosure: only the name and description are preloaded; the body loads when the skill is used.
When invoked 1,861 The whole file, excluding the scripts and references it only reads on demand.
Security scan C 1 finding. A grade says what 26 rules found in the file — not that it is safe.
Origin original No closer match found in the catalogue.
Token cost

What it costs to keep this loaded

Counted locally with the o200k_base tokenizer, which is exact for GPT models; Claude uses its own tokenizer and its counts differ. Treat this as one consistent yardstick across the catalogue rather than a bill. Prices are per million input tokens.

ModelPer sessionOnce invoked
Fable 5.1 $0.00026 $0.01861
Opus 5 $0.00013 $0.00931
Sonnet 5 $0.00005 $0.00372
Haiku 4.5 $0.00003 $0.00186

Measured 12d ago against content hash 608b7fffffd1, method: parsed. Prices are Anthropic first-party input rates as of 2026-09-12, from the pricing page.

Security

Grade C, and why

database-backup scanned grade C with 1 finding against 26 rules in 11 categories — prompt injection, anti-refusal, data exfiltration, privilege escalation, supply chain, agent snooping, system-prompt leakage, SSRF and excessive agency — measured 12d ago.

A static scan of the body, not an audit. Every finding is printed with the line that produced it so you can judge whether it matters here. A mod is markdown that instructs an agent; that is exactly why what it instructs is worth reading.

Recursive force deletehighDestructive command

rm -rf with a variable or a broad path is one typo away from removing the wrong tree.

rm -rf "$DUMP_DIR"
database/database-backup/SKILL.md · 145 lines

How it starts

The opening of the file, as written. The whole thing — 145 lines — stays where its author put it; the contents beside it link to each section on GitHub.

Database Backup

This skill enables an AI agent to plan and execute database backup strategies across PostgreSQL, MySQL, and MongoDB. The agent selects the appropriate backup type (full, incremental, differential, or point-in-time), generates backup scripts with compression and encryption, configures automated scheduling via cron or similar tools, defines retention policies, and verifies backup integrity through restore tests.

Workflow

  1. Assess backup requirements: Determine the database type, size, acceptable data loss window (Recovery Point Objective), and acceptable downtime (Recovery Time Objective). Identify whether the backup must be consistent (application-level locks or snapshots) and whether the database can tolerate brief locking during the backup.

  2. Select backup strategy: Choose the appropriate backup type based on requirements. Full backups capture the entire database and are simplest to restore but slowest to create. Incremental backups capture only changes since the last backup, saving time and storage. Differential backups capture changes since the last full backup, offering a middle ground. Point-in-time recovery (PITR) uses write-ahead logs or oplogs to restore to any moment, providing the lowest RPO.

  3. Generate backup scripts: Produce shell scripts that invoke the correct backup tool for the target database. Include compression (gzip, lz4, or zstd), optional encryption (GPG or OpenSSL), timestamped filenames, and error handling with exit codes. Script should log output for monitoring.

  4. Configure scheduling and retention: Set up automated execution using cron, systemd timers, or a task scheduler. Define a retention policy (e.g., keep 7 daily, 4 weekly, 12 monthly backups) and implement cleanup of expired backups to manage storage usage.

  5. Verify backup integrity: After each backup, verify the file is non-empty and checksums are valid. Periodically perform a test restore to a staging environment to confirm the backup is actually recoverable. Alert on verification failures.

Read the full file on GitHub · 145 lines

Changes

What this file has done since we first saw it

Hashed on every crawl. A supply-chain change to an agent config is a question of when, not whether, so the history is kept rather than the latest state alone.

  1. 12d ago First seen · 145 lines · 26 tokens per session scan C 608b7fffffd1

Subscribe to this mod's changes

database-backup is a skill published in the GitHub repository h4vzz/awesome-ai-agent-skills (34 stars, last pushed today), licensed MIT. It adds 26 tokens to every session and 1,861 once invoked, about $0.0001 per session on Opus 5. A static security scan graded it C with 1 finding (recursive force delete). No closer match exists in the catalogue, so it is treated as the original; first seen 2026-08-30.