shell

-------------------------------------------------------------------------------------------

#! /bin/sh

#backup teh table: pmc2.offers---------------------

#get the CST time-----------------
ctime=`date -d'-8 hour ago' +%m%d`

mysqldump -uroot -p123456 --default-character-set=utf8 --opt pmc2 offers | gzip > /var/www/pmc/data/pmc2_offers_`date +%Y%m%d`.gz

#clear pmc2.offers3-----------------
mysql -uroot -p123456 pmc2 < ./sqls/pmc2_clear

#import the pmc2 qa date---------------
cd /var/www/pmc/data
mv offers_us_qa_$ctime.zip offers_us_qa_$ctime.gz
gzip -d offers_us_qa_$ctime.gz
mysql -uroot -p123456 --default-character-set=utf8 pmc2 < offers_us_qa_$ctime

cd /home/sean/sh
mysql -uroot -p123456 pmc2 < ./sqls/pmc2_import

 

-------------------------------------------------------------------------------------------

2.shell执行php脚本

#! /bin/sh
cd /var/www//szqa/

php5 sz_auto_export.php

 

-------------------------------------------------------------------------------------------

3.curl执行一个网页

curl http://rs3.etiwebhosting.com/pg/

 

-------------------------------------------------------------------------------------------

4.mysql数据库备份

#! /bin/sh

#backup the table:offers,pmc_logs--------------
mysqldump -uroot -p111111 --default-character-set=utf8 --opt pmc2 offers | gzip > /var/www//pmc/data/offers_bak_`date +%y%m%d`.gz;

 

-------------------------------------------------------------------------------------------

 

 

  • 0
    点赞
  • 0
    收藏
    觉得还不错? 一键收藏
  • 0
    评论
评论
添加红包

请填写红包祝福语或标题

红包个数最小为10个

红包金额最低5元

当前余额3.43前往充值 >
需支付:10.00
成就一亿技术人!
领取后你会自动成为博主和红包主的粉丝 规则
hope_wisdom
发出的红包
实付
使用余额支付
点击重新获取
扫码支付
钱包余额 0

抵扣说明:

1.余额是钱包充值的虚拟货币,按照1:1的比例进行支付金额的抵扣。
2.余额无法直接购买下载,可以购买VIP、付费专栏及课程。

余额充值