I tried to copy a backup script like laruence, but nobody was there.
Source: Internet
Author: User
I failed to copy a backup script like laruence, and nobody was here-Linux general technology-Linux technology and application information. Here is the details. Z is a newbie, the level is shit, Mo Xiao: 0w223dc ...... To make an automatic backup can only be like this
Bird brother: # (Bird brother backs up/var/lib/mysql to/disk2/backup/daily)
# Vi/disk2/backup/backupdaily. sh
Day = 'date + % Y-% m-% d'
Basedir = "/disk2/backup/daily"
Cd/var/lib
Tar-zcf "$ basedir"/mysql. "$ day" .tar.gz mysql 2>/dev/null
Automatic
Root @ linux ~] # Vi/etc/crontab
Add 30 2 * root/disk2/backup/backupdaily. sh
Certificate --------------------------------------------------------------------------------------------------------------------------------------------------
I am: # (back up/rui/share to/xie/share/daily)
# Vi/xie/share/sharedaily. sh
Day = 'date + % Y-% m-% d'
Basedir = "/xie/share/daily"
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