Agent skill · software engineering · jeremylongshore
automating-database-backups
Automate database backup processes with scheduling, compression, and
Why this skill is useful
Adds executable scripts for automating database backups with scheduling, compression, and encryption that extend the AI's capabilities.
What it needs
Requires bash, gpg installed locally. About 3k tokens when loaded. Last updated 2026-08-07. 2,604 stars on the source repository.
What this skill does
Database Backup Automation Generate production-ready backup scripts for PostgreSQL, MySQL, MongoDB, and SQLite with compression, encryption, scheduling, and retention policies. Quick Start PostgreSQL Backup MySQL Backup MongoDB Backup Instructions Step 1: Gather Requirements Ask the user for: Database type (PostgreSQL, MySQL, MongoDB, SQLite) Database connection details (host, port, database name) Backup schedule (cron expression or frequency) Retention policy (days to keep) Encryption requirement (yes/no) Backup destination (local path, S3, GCS) Step 2: Generate Backup Script Use scripts/backupscriptgenerator.py to create a customized backup script: Step 3: Schedule with Cron Use scripts/backupscheduler.py to create cron entries: Step 4: Validate Backup After backup completes, validate integrity: Step 5: Generate Restore Procedure Create matching restore script: Cron Schedule Reference Schedule Cron Expression Description ---------- ----------------- ------------- Daily 2 AM 0 2 Low-traffic window Every 6 hours 0 /6 Frequent backups Weekly Sunday 0 2 0 Weekly full backup Monthly 1st 0 2 1 Monthly archive Retention Policy Example Output Backup Scripts: Database-specific shell scripts with compression and encryption Cron Entries: Ready-to-install crontab configurations Restore Scripts: Matching restore procedures for each backup type Validation Reports: Integrity check results for backup files Error Handling Error Cause Solution ------- ------- ---------- Connection refused DB not running Check service status: systemctl status postgresql Permission denied Wrong credentials Verify user has backup privileges Disk full No space Check space: df -h, clean old backups Lock timeout Active transactions Use --single-transaction for MySQL Resources ${CLAUDESKILLDIR}/references/postgresqlbackuprestore.md - PostgreSQL backup guide ${CLAUDESKILLDIR}/references/mysqlbackuprestore.md - MySQL backup guide ${CLAUDESKILLDIR}/references/mongodbbackuprestore.md - MongoDB backup guide ${ …
How to use it
Reference it in AdaL, Claude Code, Cursor or any coding agent — nothing to install:
@skills jeremylongshore/automating-database-backups--0c01ba