Initial commit

This commit is contained in:
Zhongwei Li
2025-11-30 08:18:59 +08:00
commit 79be0aa370
8 changed files with 182 additions and 0 deletions

View File

@@ -0,0 +1,53 @@
---
name: implementing-backup-strategies
description: |
This skill implements backup strategies for databases and applications. It generates configuration files and setup code to ensure data protection and disaster recovery. Use this skill when the user requests to "implement backup strategy", "configure backups", "setup data recovery", or needs help with "backup automation". The skill provides production-ready configurations, best practices, and multi-platform support for database and application backups. It focuses on security and scalability.
allowed-tools: Read, Write, Edit, Grep, Glob, Bash
version: 1.0.0
---
## Overview
This skill empowers Claude to generate and implement robust backup strategies for databases and applications. It provides ready-to-use configurations and setup scripts, streamlining the process of data protection and disaster recovery.
## How It Works
1. **Analyzing Requirements**: The skill analyzes the user's specific requirements, including database type, application architecture, and desired backup frequency.
2. **Generating Configuration**: Based on the requirements, the skill generates optimized configuration files for the chosen backup solution.
3. **Creating Setup Code**: The skill creates setup code (e.g., scripts, commands) to automate the backup process and ensure its consistency.
## When to Use This Skill
This skill activates when you need to:
- Implement a new backup strategy for a database or application.
- Automate existing backup processes.
- Configure backups for disaster recovery purposes.
## Examples
### Example 1: Setting up daily backups for a PostgreSQL database.
User request: "Implement daily backups for my PostgreSQL database named 'users_db' to an AWS S3 bucket."
The skill will:
1. Generate a `pg_dump` script configured to backup the 'users_db' database and upload it to the specified S3 bucket.
2. Provide instructions for scheduling the script to run daily using `cron`.
### Example 2: Configuring application-level backups for a Dockerized application.
User request: "Configure application-level backups for my Dockerized application. I want to backup the application's data directory every hour."
The skill will:
1. Generate a Docker Compose configuration that includes a volume for the application's data directory.
2. Create a backup script to copy the volume's contents to a backup location.
3. Provide instructions for scheduling the backup script using a Docker container and `cron`.
## Best Practices
- **Security**: Always encrypt backup data, both in transit and at rest.
- **Retention**: Implement a well-defined backup retention policy to manage storage costs and meet compliance requirements.
- **Testing**: Regularly test backup and restore procedures to ensure their effectiveness.
## Integration
This skill can be integrated with other tools and plugins, such as infrastructure-as-code tools (e.g., Terraform, CloudFormation) to automate the deployment and configuration of backup infrastructure. It can also work with monitoring tools to provide alerts on backup failures.

View File

@@ -0,0 +1,8 @@
# Assets
Bundled resources for backup-strategy-implementor skill
- [ ] backup_configuration_template.yaml Template for backup configuration files
- [ ] restore_configuration_template.yaml Template for restore configuration files
- [ ] example_backup_script.sh Example backup script for a specific database system
- [ ] example_restore_script.sh Example restore script for a specific database system

View File

@@ -0,0 +1,9 @@
# References
Bundled resources for backup-strategy-implementor skill
- [ ] database_backup_best_practices.md Document outlining best practices for database backups
- [ ] application_backup_best_practices.md Document outlining best practices for application backups
- [ ] disaster_recovery_plan_template.md Template for creating a disaster recovery plan
- [ ] supported_database_systems.md List of supported database systems and their specific backup procedures
- [ ] supported_application_platforms.md List of supported application platforms and their specific backup procedures

View File

@@ -0,0 +1,8 @@
# Scripts
Bundled resources for backup-strategy-implementor skill
- [ ] backup_database.sh Script to automate database backup based on provided configuration
- [ ] restore_database.sh Script to automate database restoration based on provided configuration
- [ ] validate_backup.py Python script to validate the integrity of the backup files
- [ ] configure_backup_agent.py Python script to configure a backup agent on the application server