A problem with retention was found. No backup are erase. This is solved.
|3 months ago|
|LICENSE||4 months ago|
|README.md||4 months ago|
|mysqlbackup.sh||3 months ago|
A basic script to backup mysql instance
MySQL backup list your databases. On each database, MySQL Backup lists tables, dumps schemas and data on two separate files on each tables.
databases folder, you will find the structure for each database and each table.
extras folder, you will find the routine, trigger and event of your database.
schemas folder, you will find each table structure per file.
datas folder, you will find each table data per file.
Create a backup user with these grants :
SELECT, RELOAD, LOCK TABLES, REPLICATION CLIENT, SHOW VIEW, EVENT, TRIGGER
Execute script with good parameters
Take a coffee
su - mysqlbackup cd ~ wget https://git.drycat.fr/Dryusdan/mysql-backup/raw/branch/master/mysqlbackup.sh chmod +x mysqlbackup.sh ./mysqlbackup.sh /empty/folder/for/mysqldump 7 backup S3c4ET 127.0.0.1
|Folder||Folder where dumps were stored. This folder must be empty|
|Retention||Time on the day before dropping a dump|
|Username||Username of you’re mysql’s backup user|
|Password||Password of you’re mysql’s backup user|
|Host||You’re MySQL Host. Default is 127.0.0.1|
|Port||You’re MySQL Port. Default is 3306|