How to take backup and append new records to main database using code (DB is MySQL)

Posted by Thiru under VB.NET on 9/17/2012 | Points: 10 | Views : 1507 | Status : [Member] | Replies : 2
Hi Friends,

Is there any beautiful logic for taking backup and append data using code?

Database is MySQL
To take backup and
Like to append new rows to existing database.

Note: This will occur in high data volume on daily basis.
i have to give an option in my project (developed in

Is there any beautiful logic to do?

Current code: I have just fetch all the new data (records) created today and insert it into main database.

Expecting your valuable reply.


Posted by: Jayakumars on: 9/17/2012 [Member] [MVP] Bronze | Points: 25


use this for backup from My Sql

DatabaseBackup("C:/Program Files/MySQL/MySQL Server 5.1/bin/mysqldump.exe","yourDB")

then retrieve from Dataset or Datatable and pass your insert query for this existing table insert.

Mark as Answer if its helpful to you

Thiru, if this helps please login to Mark As Answer. | Alert Moderator

Posted by: Thiru on: 9/17/2012 [Member] Starter | Points: 25

Hi Jayakumar,
Thanks for your valuable reply.
I will try and let you know.
If possible get me a sample code - please.
like how to use mysqldump.exe in to get data?

Note: As i have mentioned i have to play with large volume of data.
So, it will be great if you let me know: how to get data stored during the current month or one week time.
(is it possible to get the specified data using mysqldump.exe through code ?)

expecting your valuable reply please.

Thiru, if this helps please login to Mark As Answer. | Alert Moderator

Login to post response