#!/usr/bin/bash
path_current=$(cd "$(dirname "$0")"; pwd)
name_current=$(basename "$0" .sh)
echo $path_current
echo $name_current
rm -vf $path_current/backup/"$name_current"_`date -d '-10 days' +%Y-%m-%d`*.sql.gz
mysqldump -h waypaldb.mysql.rds.aliyuncs.com -u waypal -p'1234567' --databases waypaldev | gzip > $path_current/backup/"$name_current"_`date +%Y-%m-%d-%H-%M`.sql.gz