简体   繁体   中英

How to set up rotational full and incremental innobackupex?

Innobackupex provides both full and incremental backup of mysql servers.

But i am looking for a script that automate the process of daily full backup and incremental in certain hours.

The script will remove old backup files and mail the status etc. Any idea or readymade script ?

Thanks

Nothing ready-made that I am aware of. You should just code this yourself in bash and call the script from cron. Use find . -type d -mtime +5 -maxdepth 1 -exec rm -r {} \\; find . -type d -mtime +5 -maxdepth 1 -exec rm -r {} \\; to remove backups older than 5 days. Incremental backups using innobackupex are based on a full backup so you need to be able to reference that directory in your script. I've written many of these for my clients (I work for Percona), so it isn't hard. Shouldn't be more than 20-30 lines of bash.

The technical post webpages of this site follow the CC BY-SA 4.0 protocol. If you need to reprint, please indicate the site URL or the original address.Any question please contact:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM