Linux automatically uploads backup files and uses sftp to automatically back up important data to the target server. 1. prepare www.2cto.com to install lftpyuminstalllsfp2. create the execution file bak. sh #! /Bin/shcd/usr/local/bakfiles/tar-zcvfbakfile.tar.gzbak... linux automatically uploads backup files and uses sftp to automatically back up important data to the target server. prepare www.2cto.com to install lftp yum install lsfp 2. create the execution file bak. sh #! /Bin/shcd/usr/local/bakfile/tar-zcvf bakfile.tar.gz bakfileHOST = 192.168.0.3 USER = rootPASS = centos echo "Starting bak File... "lftp-u $ {USER}, $ {PASS} sftp: // $ {HOST} < Crontab-e> 0 1 ** 1/usr/lcoal/bakbin/bak. sh is automatically executed at every week ------------------------------------- task plan note: Time: *****/bin. sh & in the order of hours, days, months, weeks, 1, 2, 3, 4 * indicates, January 1, April 3 */10 * indicates that 0 1-5 is executed every 10 minutes ** * indicates that the execution is performed at, every day, and '&' is added to the execution file to indicate that the execution is performed in the background.
The content source of this page is from Internet, which doesn't represent Alibaba Cloud's opinion;
products and services mentioned on that page don't have any relationship with Alibaba Cloud. If the
content of the page makes you feel confusing, please write us an email, we will handle the problem
within 5 days after receiving your email.
If you find any instances of plagiarism from the community, please send an email to:
info-contact@alibabacloud.com
and provide relevant evidence. A staff member will contact you within 5 working days.
A Free Trial That Lets You Build Big!
Start building with 50+ products and up to 12 months usage for Elastic Compute Service