database-backups

database-backups is a skill for Claude Code, Codex from BagelHole/DevOps-Security-Agent-Skills. It costs 27 tokens per session (3,303 once invoked), scanned D, original, MIT.

Database backups are planned copies of databases kept so data can be restored after deletion, corruption, or an outage. This covers automated schedules, retention, offsite storage, and recovery testing for PostgreSQL, MySQL, and MongoDB.

In plain words
What is it for?
Use it to create full, incremental, snapshot, or transaction-log backups, send them to S3-compatible storage, schedule jobs, define retention, and test restores.
Why use it?
It replaces an unreliable copy-and-hope approach with a repeatable recovery process. Tested backups help reduce data loss and make disaster recovery procedures clearer.

Skill for Claude CodeCodex

Written for no agent in particular: nothing here depends on one. Also seen: positional $N argument.

Good fit Use it to create full, incremental, snapshot, or transaction-log backups, send them to S3-compatible storage, schedule jobs, define retention, and test restores.

Compare 6 skills from other repositories ↓
Install with agentmods
npx agentmods add skills/bagelhole/devops-security-agent-skills/database-backups
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 BagelHole/DevOps-Security-Agent-Skills --skill database-backups
Clone the repo
git clone --depth 1 https://github.com/BagelHole/DevOps-Security-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-backups

README.md
[![agentmods](https://agentmods.dev/badge/skills/bagelhole/devops-security-agent-skills/database-backups/github.svg)](https://agentmods.dev/skills/bagelhole/devops-security-agent-skills/database-backups)
Your own site
<a href="https://agentmods.dev/skills/bagelhole/devops-security-agent-skills/database-backups"><img src="https://agentmods.dev/badge/skills/bagelhole/devops-security-agent-skills/database-backups/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-backups

Your own site · 80×15
<a href="https://agentmods.dev/skills/bagelhole/devops-security-agent-skills/database-backups"><img src="https://agentmods.dev/badge/skills/bagelhole/devops-security-agent-skills/database-backups.svg" alt="Reviewed on agentmods" width="80" height="20"></a>
Per session 27 Skills are progressive disclosure: only the name and description are preloaded; the body loads when the skill is used.
When invoked 3,303 The whole file, excluding the scripts and references it only reads on demand.
Security scan D 2 findings. 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.00027 $0.03303
Opus 5 $0.00014 $0.01651
Sonnet 5 $0.00005 $0.00661
Haiku 4.5 $0.00003 $0.00330

Measured 5d ago against content hash 538c927bbdca, method: parsed. Prices are Anthropic first-party input rates as of 2026-09-08, from the pricing page.

Security

Grade D, and why

database-backups scanned grade D with 2 findings 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 5d 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.

Asks for rootmediumPrivilege escalation

A mod that escalates privileges can change anything on the machine, not only the project.

sudo systemctl stop mysql

Recursive force deletehighDestructive command

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

sudo rm -rf /var/lib/mysql/*
infrastructure/databases/database-backups/SKILL.md · 409 lines

How it starts

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

Database Backups

Implement comprehensive, automated database backup strategies with tested recovery procedures.

When to Use

  • You are deploying a new database and need a backup plan from day one.
  • You need to automate nightly or hourly backups for PostgreSQL, MySQL, or MongoDB.
  • You want to ship backups to S3-compatible object storage with retention policies.
  • You are building or verifying disaster recovery runbooks.

Prerequisites

  • Database client tools installed (pg_dump, mysqldump, mongodump).
  • AWS CLI or restic for remote storage.
  • cron or systemd timers for scheduling.
  • An S3 bucket (or S3-compatible endpoint) for offsite backups.

Backup Types

Type Description Frequency Use Case
Full Complete database copy Weekly Baseline for restores
Incremental Changes since last backup Daily Reduce storage and time
Transaction log / WAL Continuous log shipping Continuous Point-in-time recovery (PITR)
Snapshot Storage-level snapshot (EBS, ZFS) Daily Fast full restores

PostgreSQL Backups

Logical Backup with pg_dump

#!/bin/bash
# pg_backup.sh — PostgreSQL logical backup
set -euo pipefail

DB_NAME="mydb"
DB_USER="backup_user"
DB_HOST="localhost"
BACKUP_DIR="/backups/postgres"
DATE=$(date +%Y%m%d_%H%M%S)
FILENAME="${BACKUP_DIR}/${DB_NAME}_${DATE}.dump"

mkdir -p "$BACKUP_DIR"

# Custom compressed format (recommended for selective restore)
pg_dump -h "$DB_HOST" -U "$DB_USER" -Fc -Z6 "$DB_NAME" > "$FILENAME"

echo "[$(date)] PostgreSQL backup complete: $FILENAME ($(du -h "$FILENAME" | cut -f1))"

Physical Backup with pg_basebackup

#!/bin/bash
# pg_basebackup.sh — PostgreSQL physical backup for PITR
set -euo pipefail

BACKUP_DIR="/backups/postgres/base_$(date +%Y%m%d)"
mkdir -p "$BACKUP_DIR"

pg_basebackup \
  -h localhost \
  -U replicator \
  -D "$BACKUP_DIR" \
  --wal-method=stream \
  --checkpoint=fast \
  --progress \
  --verbose

echo "[$(date)] Base backup complete: $BACKUP_DIR"

Read the full file on GitHub · 409 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. 5d ago First seen · 409 lines · 27 tokens per session scan D 538c927bbdca

Subscribe to this mod's changes

database-backups is a skill published in the GitHub repository BagelHole/DevOps-Security-Agent-Skills (1,067 stars, last pushed 3mo ago), licensed MIT. It adds 27 tokens to every session and 3,303 once invoked, about $0.0001 per session on Opus 5. A static security scan graded it D with 2 findings (asks for root, recursive force delete). No closer match exists in the catalogue, so it is treated as the original; first seen 2026-09-03.

Related

Other skills, from other repositories

rds

AWS RDS relational database service for managed databases. Use when provisioning databases, configuring backups, managing replicas, troubleshooting connectivity, or optimizing performance.

itsmostafa/aws-agent-skills · 31 tokens

moai-platform-database-cloud

Cloud database platform specialist covering Neon (serverless PostgreSQL), Supabase (PostgreSQL 16 with real-time), and Firebase Firestore (NoSQL with offline sync). Use when choosing or setting up cloud databases.

modu-ai/moai-adk · 51 tokens

aws-essentials

Use when standing up the core AWS surface a small product needs: hardening a fresh account, a private S3 bucket, encrypted RDS Postgres, ECS Fargate vs EC2, CloudFront + OAC, or scoping an IAM policy to least privilege. NOT the CI pipeline that ships the container (that is deployment), NOT app-code access-control…

ericrisco/rsc-harness · 89 tokens

aws-rds

Amazon RDS and Aurora database configuration. Use when setting up PostgreSQL/MySQL engines, Multi-AZ, read replicas, backups, encryption, IAM auth or parameter groups.

eliecer2000/kiro-bootstrap · 39 tokens

implementing-aws-config-rules-for-compliance

Implementing AWS Config rules for continuous compliance monitoring of AWS resources, deploying managed and custom rules aligned to CIS and PCI DSS frameworks, configuring automatic remediation with SSM Automation, and aggregating compliance data across accounts.

adriannoes/awesome-agentic-ai · 53 tokens

neon-postgres

Expert patterns for Neon serverless Postgres, branching, connection.

hybridlabor-api/bdb-dev-optimized-agent-skills · 17 tokens