コード例 #1
0
ファイル: admin_manager.py プロジェクト: Boggypop/testrunner
def backup_task(do_backups=False):
    """ Run backup once a day"""
    # Invoke backup from the staging node
    if do_backups:
        shell, node = create_ssh_conn(server_ip = cfg.BACKUP_NODE_IP, username=cfg.BACKUP_NODE_SSH_USER,
                                  password=cfg.BACKUP_NODE_SSH_PWD)
        logger.error("Running backup")
        #TODO: Support per bucket backup, by default does all
        #TODO: Play with num threads
        command_options = ['-t %s' % 4]
        shell.execute_cluster_backup(backup_location=cfg.BACKUP_DIR, command_options=command_options,
                                     cluster_ip=cfg.COUCHBASE_IP, cluster_port=cfg.COUCHBASE_PORT)
コード例 #2
0
def backup_task(do_backups=False):
    """ Run backup once a day"""
    # Invoke backup from the staging node
    if do_backups:
        shell, node = create_ssh_conn(server_ip = cfg.BACKUP_NODE_IP, username=cfg.BACKUP_NODE_SSH_USER,
                                  password=cfg.BACKUP_NODE_SSH_PWD)
        logger.error("Running backup")
        #TODO: Support per bucket backup, by default does all
        #TODO: Play with num threads
        command_options = ['-t %s' % 4]
        shell.execute_cluster_backup(backup_location=cfg.BACKUP_DIR, command_options=command_options,
                                     cluster_ip=cfg.COUCHBASE_IP, cluster_port=cfg.COUCHBASE_PORT)
コード例 #3
0
ファイル: stats.py プロジェクト: strategist922/testrunner
def exec_cmd(ip, cmd, os = "linux"):
    shell, node = create_ssh_conn(server_ip=ip, os=os)
    shell.use_sudo  = False
    return shell.execute_command(cmd, node)
コード例 #4
0
def exec_cmd(ip, cmd, os="linux"):
    shell, node = create_ssh_conn(server_ip=ip, os=os)
    shell.use_sudo = False
    return shell.execute_command(cmd, node)