自动scp

[root@BMS020 ~]# cat /opt/onlineorder/logs/logtransfer.sh
#!/bin/bash
DSTUSER=monitor
DST="192.168.50.234"
DSTPATH="/data/BMS020bk"
scp -i /root/.ssh/to234  /opt/onlineorder/logs/*error*.zip $DSTUSER@$DST:$DSTPATH/error/
#&& rm -f /opt/onlineorder/logs/*error*.zip
scp -i /root/.ssh/to234  /opt/onlineorder/logs/*.gz $DSTUSER@$DST:$DSTPATH/systemout/
#&& rm -f /opt/onlineorder/logs/*.gz

posted @ 2015-04-16 13:59  金葵学子  阅读(159)  评论(0编辑  收藏  举报