日期:2014-05-16 浏览次数:20785 次
?
FN=`date +%Y_%m_%d_%H_%M` HOST=124.160.89.120 # edit 必要的文件 # 0. 编辑资源文件--数据库 #nano work/resource.properties # 1. 编辑版本 echo $FN > work/VERSION.txt nano work/VERSION.txt # do preparation rm -rf work/qqwcrm mkdir -p work/qqwcrm cp -R /opt/tomcat/webapps/qqwcrm work cp -f -R work/config work/qqwcrm/WEB-INF/config cp -f work/resource.properties work/qqwcrm/WEB-INF/ cp -f work/jdbc.DESede work/qqwcrm/WEB-INF/classes cp -f work/smsphone.properties work/qqwcrm/ cp -f work/VERSION.txt work/qqwcrm/ cp -f work/logo.gif work/qqwcrm/actiz_resource/css/default/images/logo.gif # 2. 拷贝必要的init文件 cp -f work/initscript.xml work/qqwcrm/ # sync ssh -p 6002 root@$HOST "cd /home; rm -rf qqwcrm" rsync --force --delete --recursive --ignore-errors -a -e "ssh -p 6002" -z -v /root/work/qqwcrm/ $HOST:/home/qqwcrm # login remote and backup first ssh -p 6002 root@$HOST "cd /opt/tomcat/webapps/qqwcrm; zip -q -r qqwcrm_$FN.zip .; mv qqw*.zip /opt/tomcatbak" #