Beispiel #1
0
def do_restore(region, host, hostname,  port, backup, keyspace, bucket, datadir,
               jmxusername, jmxpassword, kmskeyid):
    setup_logging(logging.WARN)

    clients = ClientCache(region)

    node = NodeTool(clients, host, port, datadir, jmxusername, jmxpassword, kmskeyid)
    node.restore(hostname, keyspace, bucket, backup)
Beispiel #2
0
def do_view(region, keyspace, hostname, bucket):
    setup_logging(logging.WARN)

    clients = ClientCache(region)
    if not hostname:
        hostname = socket.gethostname()

    node = NodeTool(clients, hostname)
    node.view(keyspace, bucket)
Beispiel #3
0
def do_view(region, keyspace, hostname, bucket, s3endpoint, loglevel):
    setup_logging(logging.getLevelName(loglevel))

    clients = ClientCache(region, s3endpoint)
    if not hostname:
        hostname = socket.gethostname()

    node = NodeTool(clients, hostname)
    node.view(keyspace, bucket)
Beispiel #4
0
def do_restore(region, host, port, backup, keyspace, hostname, bucket):
    setup_logging(logging.WARN)

    clients = ClientCache(region)
    if not hostname:
        hostname = socket.gethostname()

    node = NodeTool(clients, hostname, host, port)
    node.restore(keyspace, bucket, backup)
Beispiel #5
0
def do_backup(region, host, port, keyspace, bucket):
    setup_logging(logging.WARN)

    clients = ClientCache(region)
    hostname = socket.gethostname()

    timestamp = int(time.time())

    node = NodeTool(clients, hostname, host, port)
    node.backup(keyspace, bucket, timestamp)
Beispiel #6
0
def do_backup(region, host, port, keyspace, bucket, datadir, jmxusername,
              jmxpassword, kmskeyid):
    setup_logging(logging.WARN)

    clients = ClientCache(region)
    hostname = socket.gethostname()

    timestamp = int(time.time())

    node = NodeTool(clients, hostname, host, port, datadir, jmxusername,
                    jmxpassword, kmskeyid)
    node.backup(keyspace, bucket, timestamp)
Beispiel #7
0
def do_backup(host, hostname, port, keyspace, datadir, jmxusername,
              jmxpassword, region, bucket, kmskeyid, s3endpoint, loglevel):
    setup_logging(logging.getLevelName(loglevel))
    clients = ClientCache(region, s3endpoint)
    if not hostname:
        logger.critical("Not hostname given, using default hostname")
        hostname = socket.gethostname()

    logger.info('Hostname is : ' + hostname)
    timestamp = time.strftime("%Z-%Y-%m-%d-%H:%M:%S", time.localtime())

    node = NodeTool(clients, hostname, host, port, datadir, jmxusername,
                    jmxpassword, kmskeyid)
    node.backup(keyspace, bucket, timestamp)