BACKUP TABLE tbl_name [, tbl_name] ... TO '/path/to/backup/directory'
But keep in mind... this is a very poor way to back up your data in a relational database.
You would be better served by determining a way to handle time variancy in your table's structure
This is in reply to this from Prarthana balaji.
prathana balaji wrote:Hi all,
Please someone help me --How to take backup automatically from the database(MYSQL) after certains number of records from java GUI.
When the record count exceeds certain count then the records should move from the table to backup.
It is not a complex solution, I used some SHOW CREATE and SELECT commands and parsed the strings.
I Tried to make it look alike to a backup you take from Navicat software.
Here is the code.
Full usable 8.java file can be found here. http://isuru.diyatha.com/java-db-dump/