Database Backup
Backup database before tests, migrations, or other database operations
Install
/plugin marketplace add Freddy-CHEN-ux/00_claude_skillsThe repo is a Claude Code plugin marketplace. Run /plugin afterwards to pick the plugin that includes this skill.
npx skills add Freddy-CHEN-ux/00_claude_skills --skill database-backupgit clone --depth 1 https://github.com/Freddy-CHEN-ux/00_claude_skills.git /tmp/00_claude_skills
mkdir -p ~/.claude/skills
cp -r /tmp/00_claude_skills/skills/database-backup ~/.claude/skills/database-backupPersonal skills live in ~/.claude/skills. Use .claude/skills in a project folder to share a skill with your team.
From the SKILL.md
# Database Backup ## Core Principle Create a backup before running any operation that could modify or destroy database data. ## When to Use Before running: - Tests (`npm test`, `pytest`, `php artisan test`) - Migrations (`php artisan migrate`, `prisma migrate`) - Seeders (`php artisan db:seed`) - Any destructive queries ## Quick Start ```bash # Create backup ./scripts/backup-database.sh # Run tests with automatic backup ./scripts/safe-test.sh npm test # Run migrations with automatic backup ./scripts/safe-migrate.sh php artisan migrate # Restore if needed ./scripts/restore-database.sh --latest ``` ## Why This Matters Real incidents that informed this practice: - Tests running against production database wiped 6 months of data - `migrate:fresh` in wrong terminal reset staging database A backup takes seconds. Recovery without one can take hours or be impossible. ## Protocol ### Step 1: Check Your Database Connection ```bash # Verify which database you're connected to cat .env | grep DB_ ``` If you see production credentials, stop and switch to a test database. ### Step 2: Create Backup ```bash ./scripts/backup-database.sh ``` Or use the safe wrappers which backup automatically: ```bash ./scripts/safe-test.sh [your test command] ./scripts/safe-migrate.sh [your migration command] ``` ### Step 3: Run Your Operation After backup is confirmed, proceed with your operation. ### Step 4: Verify If something went wrong:
Details
- Skill name
database-backup- Repository
- Freddy-CHEN-ux/00_claude_skills
- Path
skills/database-backup/SKILL.md- Repo updated
- 10 January 2026
FAQ
What does the Database Backup skill do?
Backup database before tests, migrations, or other database operations
How do I install the Database Backup skill?
Claude Code plugin: /plugin marketplace add Freddy-CHEN-ux/00_claude_skills. Skills go in ~/.claude/skills (personal) or .claude/skills (project), and Claude loads them automatically when a task matches the description.
Is Database Backup popular?
It lives in Freddy-CHEN-ux/00_claude_skills, which has 8 GitHub stars and 3 forks.
Related skills
Add Integration
8Freddy-CHEN-ux/00_claude_skills
Build a new API integration for Nexus. Load when user mentions "add integration", "new integration", "integrate with", "connect to [service]", or "build [service] integration". Interactive workflow that discovers API endpoints, plans the integration, and creates a project for implementation.
AI Agents
8Freddy-CHEN-ux/00_claude_skills
Production-grade AI agent patterns with MCP integration, agentic RAG, handoff orchestration, multi-layer guardrails, and observability (modern best practices)
AI LLM
8Freddy-CHEN-ux/00_claude_skills
Production LLM engineering skill. Covers strategy selection (prompting vs RAG vs fine-tuning), dataset design, PEFT/LoRA, evaluation workflows, deployment handoff to inference serving, and lifecycle operations with cost/safety controls.
Database First
8Freddy-CHEN-ux/00_claude_skills
REQUIRED before implementing any game feature, scoring logic, state transition, or decision-making. ALL business logic lives in PostgreSQL - frontend is presentation only. Load this to understand where code belongs: database function vs component. Covers RPC patterns, SECURITY DEFINER, and anti-patterns.
Data SQL Optimization
8Freddy-CHEN-ux/00_claude_skills
Production-grade SQL optimization for OLTP systems: EXPLAIN/plan analysis, balanced indexing, schema and query design, migrations, backup/recovery, HA, security, and safe performance tuning across PostgreSQL, MySQL, SQL Server, Oracle, SQLite.
Gameplay SQL
8Freddy-CHEN-ux/00_claude_skills
Test game mechanics via SQL. Use game_* tools for gameplay flow.
Browse the most popular Claude skills, all databases skills, or write your own with the skills generator.