원클릭으로
database-backup
Backup database before tests, migrations, or other database operations
Codex 또는 Claude로 설치 이 Prompt를 복사해 Codex, Claude 또는 다른 어시스턴트에 붙여 넣으면 Skill 페이지를 검토하고 설치를 진행할 수 있습니다.
메뉴
Backup database before tests, migrations, or other database operations
Codex 또는 Claude로 설치 이 Prompt를 복사해 Codex, Claude 또는 다른 어시스턴트에 붙여 넣으면 Skill 페이지를 검토하고 설치를 진행할 수 있습니다.
Build immersive, scroll-driven websites with GSAP ScrollTrigger, Lenis smooth scroll, parallax effects, and cinematic page transitions. Use when building premium corporate sites, landing pages, or marketing microsites that need motion and polish beyond static designs.
Use when adding docstrings, creating API documentation, or building documentation sites. Invoke for OpenAPI/Swagger specs, JSDoc, doc portals, tutorials, user guides.
Use when reviewing pull requests, conducting code quality audits, or identifying security vulnerabilities. Invoke for PR reviews, code quality checks, refactoring suggestions.
Use when investigating slow queries, analyzing execution plans, or optimizing database performance. Invoke for index design, query rewrites, configuration tuning, partitioning strategies, lock contention resolution.
Use when investigating errors, analyzing stack traces, or finding root causes of unexpected behavior. Invoke for error investigation, troubleshooting, log analysis, root cause analysis.
Use when setting up CI/CD pipelines, containerizing applications, or managing infrastructure as code. Invoke for pipelines, Docker, Kubernetes, cloud platforms, GitOps.
SOC 직업 분류 기준
| name | database-backup |
| description | Backup database before tests, migrations, or other database operations |
Create a backup before running any operation that could modify or destroy database data.
Before running:
npm test, pytest, php artisan test)php artisan migrate, prisma migrate)php artisan db:seed)# 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
Real incidents that informed this practice:
migrate:fresh in wrong terminal reset staging databaseA backup takes seconds. Recovery without one can take hours or be impossible.
# Verify which database you're connected to
cat .env | grep DB_
If you see production credentials, stop and switch to a test database.
./scripts/backup-database.sh
Or use the safe wrappers which backup automatically:
./scripts/safe-test.sh [your test command]
./scripts/safe-migrate.sh [your migration command]
After backup is confirmed, proceed with your operation.
If something went wrong:
./scripts/restore-database.sh --latest
| Script | Purpose |
|---|---|
backup-database.sh | Create timestamped backup |
restore-database.sh | Restore from backup |
safe-test.sh | Backup + run tests |
safe-migrate.sh | Backup + run migrations |
See scripts/README.md for detailed usage.
Before database operations:
.env.testing for test database configuration