I need to backup a MYSQL database so that the backup database is as updated as possible, but I don't want to set my cron job so that it copies the orignal db every 5 minutes because it would hinder performance. is there a solution? I heard about db replication, but would it effect the performance of the original db?
MySQL master->slave replication is really what you're looking for.
The slave will connect to the master as if it was another client just reading the binary logs (once each transaction has been commited) and then it replies the transaction on the slave server, so the overhead on the master is very very low.
Check the MySQL replication page (http://dev.mysql.com/doc/refman/5.0/en/replication.html) in order to set it up, it requires a couple changes to your
As this link explain the Master-Slave replication process normally is not a very big hit on the master server. You can use your slave as backup or use it to get the
In the case you describe, MySQL replication can be helpful, but will not be the "silver bullet" at all.
If a user/application error happens on the master, let's say a wrong "DROP TABLE" statement, it will be replicated to the slave too, so you would be in a serious trouble when trying to rollback to a previous state.
That's why I recommend installing a database slave and keep doing full backups (via mysqldump or innobackup) + binary logs backups, so you can do a point in time recovery (PITR) in case you need it.
However, if the master crashes (HW or network failure) the slave will always allow you to do a quick switchover with minimal amount of data loss. This and running reporting/read-only queries on them, are what slaves are most useful for.
My 2 cents.