备份mysql的shell
• #!/bin/bash
• file_name=`date +%Y%m%d%H%M%S`
• db_path='/usr/local/db_back/'
• mysqldump -ulepus -p123456 -A >
${db_path}${file_name}_all.sql
• echo "backup ok"
不深思则不能造于道。不深思而得者,其得易失。
• #!/bin/bash
• file_name=`date +%Y%m%d%H%M%S`
• db_path='/usr/local/db_back/'
• mysqldump -ulepus -p123456 -A >
${db_path}${file_name}_all.sql
• echo "backup ok"