testEnvRelease.py 文件源码

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

项目:astoptool 作者: zouliuyun 项目源码 文件源码
def transfer(file):
    from bible.utils import RSYNC
    file_dir, filename = os.path.split(file)
    remote_dir = '''/app/opbak/{}'''.format(TIME)
    run(''' [ -d {0} ] || mkdir -p {0} '''.format(remote_dir))

    #cmd = ''' {rsync} {file_dir}/{{{filename},md5.txt}} {ssh_user}@{target_host}:{remote_dir}/ '''.format(file_dir=file_dir, target_host=env.host_string, remote_dir=remote_dir, ssh_user=env.user, filename=filename, rsync=RSYNC)
    #local(cmd)
    with lcd(file_dir):
        put(filename, remote_dir)
        put('md5.txt', remote_dir)

    with cd(remote_dir):
        run('dos2unix md5.txt && md5sum -c md5.txt')
评论列表
文章目录


问题


面经


文章

微信
公众号

扫码关注公众号