A collection of practical and efficient shell scripts designed to automate daily DevOps and system administration tasks. Currently featuring a robust Service Configuration Backup & Rollback Tool.
- Automated Configuration Backup: Easily back up critical service configuration files (MySQL, Redis, etc.) with automatic timestamping to prevent data loss.
- One-Click Rollback: Quickly restore previous configuration versions if a service fails due to misconfiguration.
- Interactive CLI Menu: User-friendly command-line interface to select services and actions without memorizing complex commands.
- Safety First: Includes root privilege checks and confirmation prompts to prevent accidental operations.
- Extensible Architecture: Simple dictionary-based structure makes it easy to add support for new services (e.g., Nginx, PostgreSQL).
- A Linux-based operating system (Ubuntu, CentOS, Debian, etc.)
bashshellsudoprivileges (required for modifying system files and restarting services)
- Clone the repository:
git clone https://github.com/sky41/Shell-Script-Tool-Repository.git
cd Shell-Script-Tool-Repository- Grant execution permissions:
chmod +x config_manager.sh- Run the script with root privileges:
sudo ./config_manager.sh- Follow the interactive menu:
- Select the target service (e.g., MySQL, Redis).
- Choose an action: Backup current config or Restore a previous version.
.
├── config_manager.sh # Main script for backup and rollback operations
└── README.md # Project documentation
To add support for additional services, simply edit the SERVICES associative array in config_manager.sh:
# Format: ["service_alias"]="path/to/config.conf:system_service_name"
SERVICES["nginx"]="/etc/nginx/nginx.conf:nginx"Contributions, issues, and feature requests are welcome! Feel free to check the issues page if you want to contribute.
This project is open source and available under the MIT License.