Hi Naufal,

Naufal Sheikh wrote:
Hello list.


Inorder to do some maintainance, I will be shutting down my production
server running mysql4.1. I have already prepared a backup server which is
running mysql4 and have imported the current database in it. Though one way
of doing things can be to shut down the database on the production server
and then take the dump and import it on the backup server and then after
shifting has been done to retake the dump from backpserver and import it on
the production system.

My question is that is there any better way to do this. E.g. If there is a
way to detect for new records anmd/or changes made to database, I can just
take those changes and export them on the production system. Or can we
compare the two databases on seperate servers and then sync them.

If some one can please point me to the right direction or give me a pointer
on what to look for?

You can enable binary logging, then replay the binary log events after the switch. The binary log records all changes to the data. Read the manual section about binary logging for the full details, but basically, place this in the backup server's cnf file:

log-bin

Now begin using the backup server. When you switch back, you can use the mysqlbinlog tool to apply all the changes from the backup server's binary log to the production server.

It sounds like you're not that experienced with MySQL, but if you're familiar with replication, there are a lot of ways to make this easier. I'm recommending binary logging because it's the simplest method, even if it's not the easiest.

Baron

--
MySQL General Mailing List
For list archives: http://lists.mysql.com/mysql
To unsubscribe:    http://lists.mysql.com/[EMAIL PROTECTED]

Reply via email to