Daily Weekly and Monthly DB backup with logrotate?

Posted by benjisail on Server Fault See other posts from Server Fault or by benjisail
Published on 2010-02-24T11:15:51Z Indexed on 2011/11/28 10:01 UTC
Read the original article Hit count: 286

Filed under:
|
|

I am currently keeping daily backup of my database by doing a daily mysqldump and by using logrotate to keep the 7 last days of mysqldump.

I would like to improve this backup process to keep 7 daily backup, 3 weekly backups and 12 monthly backup.

I found this article which explain how to di this with logrotate : http://www.hotcoding.com/os/sysadmin/35751.html

However I am using the dateext logrotate option to name my backup files so I cannot use this solution.

How can I do daily, weekly and monthly backup with logrotate and with the dateext option?

© Server Fault or respective owner

Related posts about mysql

Related posts about backup