How to perform one-click script for backing up website data to ftp under Linux VPS
How to carry out the one-click script of backing up website data to ftp under Linux VPS, I believe many inexperienced people are at a loss about this. Therefore, this paper summarizes the causes and solutions of the problem. Through this article, I hope you can solve this problem.
The code is as follows:
#! / 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