1

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.

2 Answers 2

1

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
1

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.

You must log in to answer this question.