views:

20

answers:

1

Hi folks,
I have database on the server but as a developer when we found some bug in the product then to resolved that bug quickly we need to take dump of database which is currently present on the server.As the db size is much larger so it is not possible everyday to create dump and download it which is wasting some times.So I wanted know is there any tool or way which will only give me data which is not present on my local machine and I can integrate that new data into db which is present on the local host machine. So it will save development time.I know some db difference tools like mysql-diff, Toad for MySql are there but I dont think they will solved problem as they are useful to see the differences between two db only.If they can solved my problem then please let me know how? Any help to achieve this will be appreciable.

A: 

As you're talking about a production database, I'd err on the side of caution, and just use mysqldump to dump out the relevant tables, rather than the whole database.

mysqldump -u dbuser -p -h 127.0.0.1 database_name table1 table2 table_etc

Alternatively, you could try rsync to synchronise the actual database files. You'll need to flush the tables, too - to ensure the data is written to disk, rather than hanging around in buffers.

If you do try the rsync method, just be sure to test it extensively.

Mr. Matt
Mr.Matt,Thnaks for the reply.I am talking about production database.But I want data which is newly added in all the tables.As some fields are having references in many tables.Is there any way to do it and of course as it is production database so security is also very important aspect.....
Rupeshit
I'd say rsync over ssh would be the way to go then, but as I say, just be careful, and test your system thoroughly before you rely on it.
Mr. Matt
Can please provide reference link to use rsync over ssh....because that will be better for me, And thanks a lot.
Rupeshit
There is quite a bit of info here: http://troy.jdmz.net/rsync/index.html
Mr. Matt