Skip to content

Latest commit

 

History

History
17 lines (11 loc) · 395 Bytes

README.md

File metadata and controls

17 lines (11 loc) · 395 Bytes

Linux scripts

mysql-export-per-db.sh

Export all databases in a MySQL instance to separate files. And keeps retention of 7 days.

0 2 * * * /path/to/mysql-export-per-db.sh

backup account requires privileges:

CREATE USER 'backup'@'localhost' IDENTIFIED BY 'password';
GRANT SHOW DATABASES, SELECT, LOCK TABLES, RELOAD, SHOW VIEW ON *.* TO 'backup'@'localhost';