#! /bin/bash
cd /home/www/deepvps
mysqldump –all-databases -uroot -ppass |gzip > mysql_backup.tar
tar -zcvf files_backup.tar.gz /home/www/deepvps/* –exclude=*.tar.gz
ftp -vn x.x.x.x << autoftp
user name pass
type binary
put mysql_backup.tar mysql_backup.tar
put files_backup.tar.gz files_backup.tar.gz
close
quit
autoftp
本文由主机测评网发布,不代表主机测评网立场,转载联系作者并注明出处:https://zhuji.jb51.net/centos/1525.html