A simple script to back up and restore Docker container volumes and configurations. Ideal for preserving data across container updates or migrations.
- Backup: Save Docker container data and configurations.
- Restore: Restore containers from backups easily.
- Automated Workflow: Schedule and automate backups for seamless data protection.
- Docker installed
- Permissions to run Docker commands
- Clone the repository:
git clone https://github.com/kyzorr/docker_container_backup.git cd docker_container_backup - Make scripts executable:
chmod +x backup_script.sh restore_script.sh
Run the following to back up your container data:
./backup_script.sh <container_name> <backup_location>To restore a backup, use:
./restore_script.sh <backup_location> <container_name>To schedule regular backups, use a cron job (Linux) or Task Scheduler (Windows).
Example cron job (daily at midnight):
0 0 * * * /path/to/backup_script.sh my_container /path/to/backups/Feel free to open issues or submit pull requests. Contributions to improve compatibility, efficiency, or add features are welcome.
This project is open-source and available under the MIT License. See the LICENSE file for details.