backup-mysql - create a tar archive with databases stored in .sql.gz separated file.
this script dump all databases into singular database.sql.gz file and create an archive .tar.xz into current script directory.
- rename .config.example to .config
- edit .config file with your data
sudo chown root:root /path/to/backup-mysql
sudo chown root:root /path/to/.config
sudo chmod 600 /path/to/.config
sudo chmod +x /path/to/backup-mysql
./backup-mysql /path/to/.config /path/to/backup/destination
zcat database.sql.gz | mysql -u username -p database_name
backup-mysql is written by Alfio Salanitri www.alfiosalanitri.it and are licensed under the MIT License.