backup-restore

backup-restore is a skill for Claude Code, Codex from JansenAnalytics/claudex. It costs 39 tokens per session (503 once invoked), scanned A, original, MIT.

A set of scripts for backing up databases and files, checking backup integrity, restoring data, and removing old backups.

In plain words
What is it for?
It helps create compressed PostgreSQL, SQLite, or directory backups, verify them, restore them to a target, apply retention rules, and schedule jobs with cron.
Why use it?
It reduces the risk of losing data and makes recovery steps repeatable when a database, file set, or server fails.

Skill for Claude CodeCodex

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

Needs its repository: it runs a file that does not travel with it, so clone the repository first. The line is bash scripts/backup.sh --type <pg|sqlite|files> --source <path-or-db> --dest <backup-dir>.

Good fit It helps create compressed PostgreSQL, SQLite, or directory backups, verify them, restore them to a target, apply retention rules, and schedule jobs with cron.

Compare 6 skills from other repositories ↓
Install

Getting it into your agent

It runs from inside its repository, so the clone comes first — what it calls does not travel with the file alone.

Clone the repo
git clone --depth 1 https://github.com/JansenAnalytics/claudex
agentmods
npx agentmods add skills/jansenanalytics/claudex/backup-restore

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 backup-restore

README.md
[![agentmods](https://agentmods.dev/badge/skills/jansenanalytics/claudex/backup-restore/github.svg)](https://agentmods.dev/skills/jansenanalytics/claudex/backup-restore)
Your own site
<a href="https://agentmods.dev/skills/jansenanalytics/claudex/backup-restore"><img src="https://agentmods.dev/badge/skills/jansenanalytics/claudex/backup-restore/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 backup-restore

Your own site · 80×15
<a href="https://agentmods.dev/skills/jansenanalytics/claudex/backup-restore"><img src="https://agentmods.dev/badge/skills/jansenanalytics/claudex/backup-restore.svg" alt="Reviewed on agentmods" width="80" height="20"></a>
Per session 39 Skills are progressive disclosure: only the name and description are preloaded; the body loads when the skill is used.
When invoked 503 The whole file, excluding the scripts and references it only reads on demand.
Security scan A 0 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.00039 $0.00503
Opus 5.5 $0.00016 $0.00201
Sonnet 5.5 $0.00008 $0.00101
Haiku 4.5 $0.00004 $0.00050

Measured 3mo ago against content hash f40f773f8258, method: parsed. Prices are Anthropic first-party input rates as of 2026-10-07, from the pricing page.

Security

Grade A, and why

backup-restore scanned grade A with 0 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 3mo 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.

Nothing flagged

None of the 26 patterns this scan looks for appear in this file: no shell pipes, no recursive deletes, no credential paths, no hidden text, no instruction-override or anti-refusal phrasing, no agent-config snooping. That is not a guarantee, it is the absence of the things that are checkable.

skills/backup-restore/SKILL.md · 70 lines

How it starts

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

backup-restore

Automated backup strategies: database dumps, file snapshots, incremental backups, verification, disaster recovery. Use when: setting up backup schedules, creating database backups, restoring from backups, verifying backup integrity, or planning disaster recovery.

Workflows

Create a backup

bash scripts/backup.sh --type <pg|sqlite|files> --source <path-or-db> --dest <backup-dir>

Creates timestamped, compressed backups. Supports PostgreSQL, SQLite, and file directories.

Restore from backup

bash scripts/restore.sh --type <pg|sqlite|files> --backup <backup-file> --dest <target>

Restores from a backup archive. Prompts for confirmation before overwriting.

Verify backup integrity

bash scripts/verify-backup.sh <backup-file>

Checks checksums, tests archive integrity, and validates contents.

Clean up old backups (retention)

bash scripts/retention-cleanup.sh <backup-dir> [--keep-days 30] [--keep-count 10]

Removes old backups based on age or count, keeping minimum required.

Set up cron schedule

bash scripts/cron-setup.sh --schedule "0 2 * * *" --command "bash /path/to/backup.sh ..."

Adds a cron entry for automated backups.

Scripts

Script Purpose
scripts/backup.sh Universal backup (pg/sqlite/files)
scripts/restore.sh Restore from backup
scripts/verify-backup.sh Verify backup integrity
scripts/retention-cleanup.sh Clean old backups
scripts/cron-setup.sh Set up cron schedule

References

File Contents
references/backup-strategies.md 3-2-1 rule, patterns, restore testing

Read the full file on GitHub · 70 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. 3mo ago First seen · 70 lines · 39 tokens per session scan A f40f773f8258

Subscribe to this mod's changes

backup-restore is a skill published in the GitHub repository JansenAnalytics/claudex (5 stars, last pushed 5mo ago), licensed MIT. It adds 39 tokens to every session and 503 once invoked, about $0.0002 per session on Opus 5.5. A static security scan graded it A with 0 findings. No closer match exists in the catalogue, so it is treated as the original; first seen 2026-08-31.

Related

backup-restore compared with skills from other repositories

backup-restore next to 6 skills from other repositories
ModTypeStarsLast pushLicenceScanTokensWorks with
backup-restoreJansenAnalytics/claudexSkill55mo agoMITA39Claude Code, Codex
cis-aws-database-2.8CyberStrikeus/CyberStrikeSkill3.8ktodayAGPL-3.0A20Claude Code, Codex
backupsericrisco/rsc-harnessSkill6915d agoMITA82Claude Code, Codex
cis-aws-foundations-3.2.4CyberStrikeus/CyberStrikeSkill3.8ktodayAGPL-3.0A26Claude Code, Codex
cis-aws-database-4.9CyberStrikeus/CyberStrikeSkill3.8ktodayAGPL-3.0A15Claude Code, Codex
cis-aws-database-11.7CyberStrikeus/CyberStrikeSkill3.8ktodayAGPL-3.0A16Claude Code, Codex
cis-aws-database-5.13CyberStrikeus/CyberStrikeSkill3.8ktodayAGPL-3.0A18Claude Code, Codex