图片-稻子网
图片-稻子网
图片-稻子网
图片-稻子网

rsync to envs

cat rsync-all.sh
#!/bin/bash
ex="--exclude=conf/ --exclude=fg/gamelist/public/global/app/ --exclude=fg/lobby/public/global/app/ --exclude=fg/platform/backend/phpScript/file/ --exclude=fg/platform/backend/phpScript/log/ --exclude=fg/logs/ --exclude=fg/gamelist/public/global/game/ --exclude=fg/gamelist/public/global/list/ --exclude=fg/platform/public/global/files/ --exclude=fg/gamelist/public/global/files/"
echo -e "\\n@@@@@@@@@@@@@@@@@from uat to 200.111\\n"
rsync -vzrtopg --delete --port=37873 rsync@103.196.124.137::game_fg /opt/UAT/fg/logo --password-file=/etc/rsync.pass
rsync -vzrtopg --delete --port=37873 rsync@103.196.124.137::fg-all /opt/UAT/fg/client --password-file=/etc/rsync.pass
rsync -vzrtopg --delete --port=37873 rsync@103.196.124.137::plat /opt/UAT/fg/plat --password-file=/etc/rsync.pass $ex
echo -e "\\n@@@@@@@@@@@@@@@@@from 200.111 to pdev\\n"
ssh root@192.168.200.46 -i /root/.ssh/starsliao-gmt rsync -vzrtopg --delete rsync@192.168.200.111::fg_client /data/www/fg/gamelist/public/global/list --password-file=/etc/rsync.pass
ssh root@192.168.200.46 -i /root/.ssh/starsliao-gmt rsync -vzrtopg --delete rsync@192.168.200.111::fg_logo /data/www/fg/gamelist/public/global/game --password-file=/etc/rsync.pass
ssh root@192.168.200.46 -i /root/.ssh/starsliao-gmt rsync -vzrtopg --delete rsync@192.168.200.111::plat /data/www --password-file=/etc/rsync.pass $ex
echo -e "\\n@@@@@@@@@@@@@@@@@from pdev(200.46) to psit(200.14)\\n"
ssh root@192.168.200.46 -i /root/.ssh/starsliao-gmt rsync -vzrtopg --delete --port=37873 /data/www/fg/gamelist/public/global/list/ rsync@192.168.200.14::fg-all --password-file=/etc/rsync.pass
ssh root@192.168.200.46 -i /root/.ssh/starsliao-gmt rsync -vzrtopg --delete --port=37873 /data/www/fg/gamelist/public/global/game/ rsync@192.168.200.14::game_fg --password-file=/etc/rsync.pass
ssh root@192.168.200.46 -i /root/.ssh/starsliao-gmt rsync -vzrtopg --delete --port=37873 /data/www/ rsync@192.168.200.14::plat --password-file=/etc/rsync.pass $ex
echo -e "\\n@@@@@@@@@@@@@@@@@from psit to puat\\n"
ssh root@192.168.200.14 -i /root/.ssh/starsliao-gmt rsync -vzrtopg --delete --port=37873 /data/www/fg/gamelist/public/global/list/ rsync@103.196.124.34::fg-all --password-file=/etc/rsync.pass
ssh root@192.168.200.14 -i /root/.ssh/starsliao-gmt rsync -vzrtopg --delete --port=37873 /data/www/fg/gamelist/public/global/game/ rsync@103.196.124.34::game_fg --password-file=/etc/rsync.pass
ssh root@192.168.200.14 -i /root/.ssh/starsliao-gmt rsync -vzrtopg --delete --port=37873 /data/www/ rsync@103.196.124.34::plat --password-file=/etc/rsync.pass $ex
rsync -vzrtopg --delete rsync@103.196.124.137::game_fg /opt/UAT/ --password-file=/etc/rsync.pass
by  fgslot  fruit texas
###UAT-TO-200.111
rsync -vzrtopg --delete --port=37873 rsync@103.196.124.137::game_fg /opt/UAT/fg/logo --password-file=/etc/rsync.pass
rsync -vzrtopg --delete --port=37873 rsync@103.196.124.137::fg-all /opt/UAT/fg/client --password-file=/etc/rsync.pass
#rsync -vzrtopg --delete --port=37873 rsync@103.196.124.137::by /opt/UAT/fg/client/by --password-file=/etc/rsync.pass
#rsync -vzrtopg --delete --port=37873 rsync@103.196.124.137::fgslot /opt/UAT/fg/client/fgslot --password-file=/etc/rsync.pass
#rsync -vzrtopg --delete --port=37873 rsync@103.196.124.137::fruit /opt/UAT/fg/client/fruit --password-file=/etc/rsync.pass
#rsync -vzrtopg --delete --port=37873 rsync@103.196.124.137::texas /opt/UAT/fg/client/texas --password-file=/etc/rsync.pass
###UAT-TO-PUATPPRO
rsync -vzrtopg --delete --port=37873 rsync@10.200.124.137::fg-all /data/www/fg/gamelist/public/global/list --password-file=/etc/rsync.pass
rsync -vzrtopg --delete --port=37873 rsync@10.200.124.137::game_fg /data/www/fg/gamelist/public/global/game --password-file=/etc/rsync.pass
###UAT-TO-PSITPDEV
rsync -vzrtopg --delete --port=37873 rsync@103.196.124.137::fg-all /data/www/fg/gamelist/public/global/list --password-file=/etc/rsync.pass
#rsync -vzrtopg --delete --port=37873 rsync@103.196.124.137::by /data/www/fg/gamelist/public/global/list/fish --password-file=/etc/rsync.pass
#rsync -vzrtopg --delete --port=37873 rsync@103.196.124.137::fgslot /data/www/fg/gamelist/public/global/list/slot --password-file=/etc/rsync.pass
#rsync -vzrtopg --delete --port=37873 rsync@103.196.124.137::fruit /data/www/fg/gamelist/public/global/list/fruit --password-file=/etc/rsync.pass
#rsync -vzrtopg --delete --port=37873 rsync@103.196.124.137::texas /data/www/fg/gamelist/public/global/list/poker --password-file=/etc/rsync.pass
echo "8wua7dbzW@">/etc/rsync.pass
chmod 600 /etc/rsync.pass
###200.111-TO-PSITPDEV
rsync -vzrtopg --delete rsync@192.168.200.111::fg_logo /data/www/fg/gamelist/public/global/game --password-file=/etc/rsync.pass
rsync -vzrtopg --delete rsync@192.168.200.111::fg_client /data/www/fg/gamelist/public/global/list --password-file=/etc/rsync.pass
md5-60dd088da6cba735d430b7fb15d6d134
rsync -vzrtopg --port=37873 --include=*.zip --exclude=*.* /opt/resource/slot/slot/ rsync@103.196.124.137::slot --password-file=/etc/rsync.pass
rsync -vzrtopg --port=37873 --include=*.zip --exclude=*.* rsync@103.196.124.137::fgslot /data/www/fg/gamelist/public/global/list/slot/ --password-file=/etc/rsync.pass
md5-60dd088da6cba735d430b7fb15d6d134
#!/bin/sh
PATH=/sbin:/bin:/usr/sbin:/usr/bin:/usr/local/sbin:/usr/local/bin
/usr/local/bin/inotifywait -mrq --timefmt '%Y%m%d-%H:%M' --format '%T %e %w%f' -e  close_write,modify,delete,create,move,attrib /data/www/fg/gamelist | while read x
do
rsync -avzp --port=873 --delete  --progress  --exclude ".svn" --exclude ".git"  --exclude "*.php" --password-file=/etc/rsync --bwlimit=5048 /data/www/fg/gamelist  cdn_fg@119.23.145.117::cdn_fg
echo $x >> /var/log/rsync.log
done &
md5-2e6ce1390c07569e322be618f218f337
#[root@fg-uat-nginx fg]# cat /etc/rsyncd.conf
uid = www
gid = www
port = 37873
use chroot = yes
max connections = 0
pid file = /var/run/rsyncd.pid
log file = /var/log/rsyncd.log
exclude = lost+found/
transfer logging = yes
timeout = 900
dont compress   = *.gz *.tgz *.zip *.z *.Z *.rpm *.deb *.bz2
read only = no
[by]
comment = /data/www/fg/gamelist/public/global/list/fish         FG-fish
path = /data/www/fg/gamelist/public/global/list/fish
auth users = rsync
secrets file = /etc/rsync.passwd
[texas]
comment = /data/www/fg/gamelist/public/global/list/poker        FG-poker
path = /data/www/fg/gamelist/public/global/list/poker
auth users = rsync
secrets file = /etc/rsync.passwd
[fgslot]
comment = /data/www/fg/gamelist/public/global/list/slot         FG-slot
path = /data/www/fg/gamelist/public/global/list/slot
auth users = rsync
secrets file = /etc/rsync.passwd
[fruit]
comment = /data/www/fg/gamelist/public/global/list/fruit        FG-fruit
path = /data/www/fg/gamelist/public/global/list/fruit
auth users = rsync
secrets file = /etc/rsync.passwd
[fg-all]
comment = /data/www/fg/gamelist/public/global/list        FG-all
path = /data/www/fg/gamelist/public/global/list
auth users = rsync
secrets file = /etc/rsync.passwd
[game]
path = /data/www/gamelist/public/global/gamelist/default/img/game
comment = /data/www/gamelist/public/global/gamelist/default/img/game
auth users = rsync
secrets file = /etc/rsync.passwd
[game_big]
path = /data/www/gamelist/public/global/gamelist/default/img/game_big
comment = /data/www/gamelist/public/global/gamelist/default/img/game_big
auth users = rsync
secrets file = /etc/rsync.passwd
[game_fg]
path = /data/www/fg/gamelist/public/global/game
comment = /data/www/fg/gamelist/public/global/game
auth users = rsync
secrets file = /etc/rsync.passwd
[plat]
path = /data/www
comment = /data/www
exclude = fg/platform/backend/phpScript/file/ fg/platform/backend/phpScript/log/ fg/logs/ fg/gamelist/public/global/game/ fg/gamelist/public/global/list/
auth users = rsync
secrets file = /etc/rsync.passwd
[test_resource]
path = /data/test_resource
auth users = rsync
secrets file = /etc/rsync.passwd
md5-2e6ce1390c07569e322be618f218f337
rsync -avzp --port=873 --delete  --progress --exclude ".svn" --exclude ".git"  --exclude "*.php" --password-file=/etc/rsync_fgcdn /data/www/fg/gamelist/public/global/game/ChessPoker/6002  cdn_fg@119.23.145.117::cdn_fg/public/global/game/ChessPoker/6002
rsync -avzp --port=873 --delete  --progress --exclude ".svn" --exclude ".git"  --exclude "*.php" --password-file=/etc/rsync_fgcdn /data/www/fg/gamelist/public/global/files/custom/ cdn_fg@119.23.145.117::cdn_fg/gamelist/public/global/files/custom/
rsync -avzp --port=873 --delete  --progress --exclude ".svn" --exclude ".git"  --exclude "*.php" --password-file=/etc/rsync_fgcdn /data/www/fg/gamelist/public/global/files/images/ cdn_fg@119.23.145.117::cdn_fg/gamelist/public/global/files/images/
rsync -avzp --port=873 --delete  --progress --exclude ".svn" --exclude ".git"  --exclude "*.php" --password-file=/etc/rsync_fgcdn /data/www/fg/gamelist/public/global/app/ cdn_fg@119.23.145.117::cdn_fg/gamelist/public/global/app/
rsync -avzp --port=873 --delete  --progress --exclude ".svn" --exclude ".git"  --exclude "*.php" --password-file=/etc/rsync_fgcdn /data/www/fg/gamelist/public/global/list/fish/ cdn_fg@119.23.145.117::cdn_fg/gamelist/public/global/list/fish/
rsync -avzp --port=873 --delete  --progress --exclude ".svn" --exclude ".git"  --exclude "*.php" --password-file=/etc/rsync_fgcdn /data/www/fg/gamelist/public/global/list/fruit/ cdn_fg@119.23.145.117::cdn_fg/gamelist/public/global/list/fruit/
rsync -avzp --port=873 --delete  --progress --exclude ".svn" --exclude ".git"  --exclude "*.php" --password-file=/etc/rsync_fgcdn /data/www/fg/gamelist/public/global/list/poker/ cdn_fg@119.23.145.117::cdn_fg/gamelist/public/global/list/poker/
rsync -avzp --port=873 --delete  --progress --exclude ".svn" --exclude ".git"  --exclude "*.php" --password-file=/etc/rsync_fgcdn /data/www/fg/gamelist/public/global/list/slot/ cdn_fg@119.23.145.117::cdn_fg/gamelist/public/global/list/slot/
#############200.111############
rsync -avzp --port=873 --delete  --progress --exclude ".git" --password-file=/etc/rsync_fgcdn /opt/resource/fgslot/fgslot/2251/ cdn_fg@119.23.145.117::cdn_fg/gamelist/public/global/list/slot/2251/
rsync -avzp --port=873 --delete  --progress --exclude ".git" --password-file=/etc/rsync_fgcdn /opt/resource/fruit/fruit/ cdn_fg@119.23.145.117::cdn_fg/gamelist/public/global/list/fruit/
rsync -avzp --port=873 --delete  --progress --exclude ".git" --password-file=/etc/rsync_fgcdn /opt/resource/by/by/ cdn_fg@119.23.145.117::cdn_fg/gamelist/public/global/list/fish/
rsync -avzp --port=873 --delete  --progress --exclude ".git" --password-file=/etc/rsync_fgcdn /opt/resource/texas/texas/6501/ cdn_fg@119.23.145.117::cdn_fg/gamelist/public/global/list/poker/6501/
rsync --list-only cdn_fg@119.23.145.117::cdn_fg/gamelist/public/global/list/slot/2251/ --password-file=/etc/rsync_fgcdn
© 版权声明
THE END
喜欢就支持一下吧
点赞4 分享
评论 抢沙发
头像
欢迎您留下宝贵的见解!
提交
头像

昵称

取消
昵称表情代码图片