Used Crontab On Server To Regularly Backup MySql Database

I added cron tasks to backup the server this blog site database, cron expression is in the form of ascending order of from 'minute/frequency to hour, day, month, dayOfWeek, command', but to use date format, % symbol has to be escaped, 'crontab -e', then 'crontab -l', then such as '01 0-23/4 * * 5 mysqldump --routines --databases mydb db`date +\%Y\%m\%d\%H\%M\%S`.sql', and use 'tar -czvf dest.tar.gz some.sql'

crondbbackup

vim commands used:

copy line: yy

paste line: move cursor, then p

del line: dd

go to line: :lineNO.

undo: :u

留下你的评论