mobile_static_resources.py 文件源码

python
阅读 18 收藏 0 点赞 0 评论 0

项目:astoptool 作者: zouliuyun 项目源码 文件源码
def rsync_to_backup(game, region):
    print("??????????????...")
    sys.stdout.flush()
    time.sleep(20)
    config = ConfigReader(game, region)
    rsync_module = config.get("rsync_module")
    rsync_root = config.get("rsync_root")
    rsync_backup_ip = config.get("rsync_backup_ip")

    if rsync_module == "" or rsync_root == "" or rsync_backup_ip == "" :
        raise Exception('rsync config is not proper in the game config file')

    with cd(rsync_root), settings(user='root'), hide("stdout"):
        run('''rsync -art -R --delete --out-format="%n" --password-file=/etc/rsyncd.secret ./ {}::{}'''.format(rsync_backup_ip, rsync_module))
评论列表
文章目录


问题


面经


文章

微信
公众号

扫码关注公众号