Automatic MYSQL database backup and recovery tools on a regular basis

MYSQL database backup There are two main ways:

1. Only backup data, not backup data agency.

? SQL: ? SELECT * FROM table_name INTO OUTFILE 'filepath' ?FIELDS TERMINATED BY '|' ENCLOSED BY '"' LINES TERMINATED BY '\r\n';


2. Back up the entire database

? Use mysqldump command


In order to reduce the space occupied by the server, I used the first way, using Delphi to write a small tool MYSQLBAK.


The entire tool consists of two files after downloading extract to any place (Note: The storage path can not have Chinese !!!)


The following is a description of its use:

1. This is the way it starts running.



2. Tap the "Settings" button, some preliminary settings (note that this initial database can choose the existing database on a server, only the initial connection to the database, do not do anything else)



3. Select the database to be automatically backed up on a regular basis.



4. Set way back up and clean up the old data.



5. After setting, click on the "Scheduled Backup" button, the tool will automatically run, according to a regular way back up the database automatically set to the next db_backup subdirectory of the installation directory. The way a database is stored in a directory, the directory data is backed up at different times, to deposit a subdirectory different times.



6. If you want to restore the data, click on the "Restore Database" button, all databases on the server will be listed, if there is a branch appears, it shows to be backed up. Timestamp display the contents of the branch is backed up. Timestamp can choose which backup data recovery.



7. After selecting timestamp, click on the "Select Data Table" button, a list of all the data tables are backed up, you can choose to restore individual tables, you can also choose to restore all of the table.



8. After running the tool, click "minimize" will shrink into a small icon in the lower right corner for the long run on the server, mysql data is automatically backed up regularly.



I've uploaded to the tool Resources in: Download Link


Guess you like

Origin www.cnblogs.com/shishitongbu/p/11021027.html