Collection of backup scripts (sometimes just wrapers) for MySQL.
Tools to enhance the MySQL Backup experience and make it easier (almost plug and play...almost!)
Source: mydumper.sh
Mydumper is "a little bit" faster. At least accoding to my experience.
My test case is a bunch of databases (/var/lib/mysql size is 5.8GB)
- mydumper.sh script: 71 seconds
- mysqldump --all-databases | gzip -1 > all_dbs.sql.gz : 117 seconds
The script takes care of the retention policy (defined by the user), as followed:
- For MyDumper: User will define weekly and daily retention times.
mydumper.sh Bash script used as a wraper of the MyDumper backup tool. Run this script as a daily cronjob
mydumper_restore.sh
Bash script that restores backups generated with mydumper
Expects 2 arguments:
- Backup-point
- Databasename (or all)
- running it without arguments will show available backup-points
- running it with a valid backup-point argument but without database name will output all available database backups
Example (restores backup for the database "ticket" from April 19th 2021):
./mydumper_restore.sh 20210419 ticket
config.sh Set the backup path , the retention time and mysql user.