Get the App
SLTechnology News&Howtos  ›  Servers  › 

How to perform one-click script for backing up website data to ftp under Linux VPS

Shulou Source: shulou.com Published: 2022-06-01 06:42:25 11月13日 Update

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

Tags: Backups data websites scripts one click content methods more problems nothing you can do for this code reasons skills articles experience industry information information channels Apple Docker Huawei Linux macOS MariaDB Microsoft MySQL NVidia OPPO Reno Redmi Microsoft Apple Shulou Tech Info Xiaomi