nginx配置文件备份

#/bin/bash
DATE=$(date +%Y%m%d%H%M)

tar -zcvf nginx_config_bakup_$DATE.tar.gz /etc/nginx/*

expect << EOF
spawn scp nginx_config_bakup_$DATE.tar.gz [email protected]:/data/backups/weekly/nginx
expect “password
send “gKAu5%\n”
expect eof
EOF

find /data/scripts/ -name *.tar.gz -exec rm -rf {} ;

猜你喜欢

转载自blog.csdn.net/weixin_45577002/article/details/119110810
今日推荐