#!/usr/bin/env python
# -*- coding:utf-8 -*-
 
import paramiko
import time
 
mydate = time.strftime("%Y%m%d")
hostname="192.168.56.56"
hostname='%s' %hostname
port=22
port=int(port)
username="oracle"
username='%s' %username
password="oracle"
password='%s' %password
 
transport = paramiko.Transport((hostname,port))
transport.connect(username=username,password=password)
sftp = paramiko.SFTPClient.from_transport(transport)
remotefile='/data/db_bak/expdp_'+mydate+'.dmp'
localfile='/tmp/expdp_'+mydate+'.dmp'
 
sftp.get(remotefile,localfile)
transport.close()

auto_ftp_sh的更多相关文章

随机推荐

  1. Vue学习之路第二十篇:Vue生命周期函数-组件创建期间的4个钩子函数

    1.每个 Vue 实例在被创建时都要经过一系列的初始化过程——例如,需要设置数据监听.编译模板.将实例挂载到 DOM 并在数据变化时更新 DOM 等.同时在这个过程中也会运行一些叫做生命周期钩子的函数 ...

  2. uwsgi部署django,里的request调用的接口响应慢解决方法

    解决方法,增加2个线程 uwsgi.ini 配置如下 chdir=/var/www/Ultramanpidfile=/tmp/uwsgi.pidmodule=Ultraman.wsgimaster=t ...

  3. 非传统题初探——AtCoder Practice Contest #B - インタラクティブ練習 (Interactive Sorting)

    原题: Time limit : 2sec / Memory limit : 256MB Score : 300 points Problem Statement This is an interac ...

  4. docker安装部署

    1. 如何安装 Epel源到 RHEL/CentOS 7/6/5? RHEL/CentOS rpm -ivh http://mirrors.ustc.edu.cn/epel/7/x86_64/Pack ...

  5. 5、SpringBoot+MyBaits+Maven+Idea+pagehelper分页插件

    1.为了我们平时方便开发,我们可以在同一个idea窗口创建多个项目模块,创建方式如下 2.项目中pom.xm文件的内容如下 <?xml version="1.0" encod ...

  6. elasticsearch实战 中文+拼音搜索

    需求 雪花啤酒  需要搜索雪花.啤酒 .雪花啤酒.xh.pj.xh啤酒.雪花pj ik导入 参考https://www.cnblogs.com/LQBlog/p/10443862.html,不需要修改 ...

  7. MySQL特异功能之:Impossible WHERE noticed after reading const tables

    用EXPLAIN看MySQL的执行计划时经常会看到Impossible WHERE noticed after reading const tables这句话,意思是说MySQL通过读取"c ...

  8. try finnlay 总结

    public class FinnallyTest { public static void main(String[] args){ System.out.print(go()); } public ...

  9. SpringBoot中logback.xml使用application.yml中属性

    教你如何使用 springProfile 与 springProperty 让你的logback.xml 配置显得更有逼格,当别人还在苦苦挣扎弄logback-{profile}.xml的时候 你一个 ...

  10. MySQL出现no mycat database selected的问题分析

    1.先抛开mycat来处理 2.在查询表时,要指定是哪个数据库,然后再查询. ①.如果再MySQL Workbench中,先使用use tablename;,然后在执行操作语句:或者在语句上指定要查询 ...