Take the 2-minute tour ×
Server Fault is a question and answer site for system and network administrators. It's 100% free, no registration required.

Right now i have a cron job that dumps my database twice a day. Right now its fine because my DB is < 100mb. I have limited space on the server (also i'd like to reverse space for other things). How do i make incremental backup with mysql? i would like to do it every 3-4 hours and a full dump on a weekly basis.

How do i do this? Also i hear using a 'binary log' is good but i am unsure how to do that properly.

Many links is welcomed.

share|improve this question

2 Answers 2

Mysql.com explains how to make incremental backups: mysql.com backups . It also tells you how to restore those backups mysql.com recovery.

Have you tried Gzip'ing your dump files? You should be able to reduce your dump file size by 75%. That would save you a lot of space without the extra effort required for incremental backups.

mysqldump -p$Pass -u$User $DATABASE | gzip --best > $DATABASE.$TIME.gz
share|improve this answer

If you use Innodb storage engine, you have two options. One is commercial Innobackup solution and the other is Xtrabackup by Percona. I use the latter. Not perfect, still a lot of problems, but most of the time it works. BTW, I had better results with 1.0 version than with later releases. Check http://percona.com.

share|improve this answer

Your Answer

 
discard

By posting your answer, you agree to the privacy policy and terms of service.

Not the answer you're looking for? Browse other questions tagged or ask your own question.