Site backup script

Source: Internet
Author: User
Install an lftpyum-yinstalllftp script to automatically back up the database www.2cto.com # every day #! /Bin/bash/usr/local/mysql/bin/mysqldump-uusername-ppassword -- databasesblog & gt;/home/wwwroot/backup/da... install an lftp yum-y install lftp script to automatically back up the database www.2cto.com # every day #! /Bin/bash/usr/local/mysql/bin/mysqldump-uusername-ppassword -- databases blog>/home/wwwroot/backup/databackup _ $ (date + % Y % m % d ). SQL tar zPcf/home/wwwroot/backup/databackup _ $ (date when policy1_m1_d1_. SQL .tar.gz/home/wwwroot/backup/usr/bin/lftp-u ftpusername, ftppassword ftpip/backup-e "put/home/wwwroot/backup/databackup _ $ (date when policy?m=d=. SQL .tar.gz; exit" rm-r/home/wwwroot/backup/* chmod + x dbbackup. sh cro Ntab-e 0 0 **** sh/usr/local/nginx/conf/dabackup. sh // The Weekly automatic backup of website data is automatically run at 00:00 every day. www.2cto.com #! /Bin/bashtar zPcf/home/wwwroot/backup/blogbackup _ $ (date when policy?m=d=.tar.gz/home/wwwroot/usr/bin/lftp-u ftpusername, ftppassword ftpip/backup-e "put/home/wwwroot/backup/blogbackup _ $ (date when policy1_m1_d1_.tar.gz; exit" rm-r/home/wwwroot/backup/* chmod + x blogbackup. sh crontab-e 0 0 ** 1 sh/usr/local/nginx/conf/blogbackup. sh // back up data once a week
 
Related Article

Contact Us

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

  • Sales Support

    1 on 1 presale consultation

  • After-Sales Support

    24/7 Technical Support 6 Free Tickets per Quarter Faster Response

  • Alibaba Cloud offers highly flexible support services tailored to meet your exact needs.