防止圖片盜連
root@domainname:/home/liaozi# crontab -l
0 17 * * * /home/liaozi/backup.sh
root@domainname:/home/liaozi# cat /home/liaozi/backup.sh
day=`date +%Y-%m-%d`
basedir="/root/backup"
/opt/lampp/lampp stopmysql
cd /opt/lampp/var/
tar -zcf "$basedir"/mysql."$day".tar.gz mysql 2> /dev/null
/opt/lampp/lampp startmysql
1. 先將網芳資料載掛,複製檔案後再卸載
smbmount //192.168.0.185/Desktop /home/domainname/desktop/ -o guest,iocharset=utf8,codepage=cp950 cp -ru /home/domainname/desktop/ /home/domainname/liaozi/ umount /home/domainname/desktop/
0 17 * * * /home/liaozi/backup.sh
root@domainname:/home/liaozi# cat /home/liaozi/backup.sh
day=`date +%Y-%m-%d`
basedir="/root/backup"
/opt/lampp/lampp stopmysql
cd /opt/lampp/var/
tar -zcf "$basedir"/mysql."$day".tar.gz mysql 2> /dev/null
/opt/lampp/lampp startmysql
1. 先將網芳資料載掛,複製檔案後再卸載
smbmount //192.168.0.185/Desktop /home/domainname/desktop/ -o guest,iocharset=utf8,codepage=cp950 cp -ru /home/domainname/desktop/ /home/domainname/liaozi/ umount /home/domainname/desktop/
留言