Using the system crontab to periodically execute backup files, save the backup results by date, and achieve the purpose of backup.
1. Create a path to save the backup file /mysqldata #mkdir /mysqldata 2. Create /usr/sbin/bakmysql file #vi /usr/sbin/bakmysql Enter rq=` date +%Y%m%d ` tar zcvf /mysqldata/mysql$rq.tar.gz /var/lib/mysql or write rq=` date +%Y%m%d ` mysqldump --all-databases -u root -p980405 > /mysqldata/mysql $rq.tar.gz /var/lib/mysql is the directory of your database files, some users are /usr/local/mysql/data, each person may be different /mysqldata/means to save the backup file directory, this everyone can also Do it according to your own requirements. 3, modify the file properties to make it executable # chmod +x /usr/sbin/bakmysql 4, modify /etc/crontab #vi /etc/crontab Add 01 3 * * * root /usr/sbin/bakmysql Perform backup at 3 o'clock, restart crond # /etc/rc.d/init.d/crond restart to complete. So every day you can see such a file in /mysqldata mysql20040619.tar.gz You can download it directly. Stop the database service process or lock the database before the tar command is executed. Otherwise, when the data is restored, the database will be damaged. If you are lucky, you can repair it. If you are not lucky, you will not be able to.
In our computers hard drive, there are some important data and secret files that we dont wan
Since the Chinese version of Windows XP SP1 came out, many netizens have reported that they tried to
By default, there is an input method flag on the Windows taskbar, called the input method ic
Windows Movie Maker is a multimedia component used to create home movie files in Windows XP. It firs
New ideas to restore system administrator password with Gene (3)
Let the USB device quickly get out of the computer with just one click
The secret of tapping the Windows operating system shortcut
Three file hiding tips in Windows system
Solve the network failure caused by SP2
Windows XP print sharing four major problems and solutions
Windows xp Group Policy How to Start Actions
Easily restrict access to local group policies
Turn off Win XP annoying "notification function"
Turn off Windows XP related ports to secure
Win8 prompts "No disk in the drive" when shutting down
Solve the high reason and method of online game PING under Win7
Win8 system confidential file VHD+BitLocker storage method
Foxmail secret transfer function using graphic steps
How to share folders in VirtualBox under Win7 system?
Win7 system to play the game to find a narrower recovery method
Causes and solutions for slow Internet access in Win7 system
Win7 computer can not start the program prompt "load driver failed" how to solve?