示例#1
0
def clone_mysql_backup(
    ctx,
    netcat_port,  # pylint: disable=too-many-arguments
    replication_user,
    replication_password,
    compress,
    destination,
    source,
):
    """
     Clone mysql backup on remote server and make it a slave.
     By default it will take a slave from a local MySQL on port 3306.

     Source and destinations are strings hostname:port.
     E.g. 10.10.10.10:3306.

     If port isn't specified 3306 will be assumed.
    """
    clone_mysql(
        ctx.obj["twindb_config"],
        source,
        destination,
        replication_user,
        replication_password,
        netcat_port=netcat_port,
        compress=compress,
    )
示例#2
0
文件: cli.py 项目: twindb/backup
def clone_mysql_backup(ctx, netcat_port,  # pylint: disable=too-many-arguments
                       replication_user,
                       replication_password,
                       compress,
                       destination, source):
    """
     Clone mysql backup on remote server and make it a slave.
     By default it will take a slave from a local MySQL on port 3306.

     Source and destinations are strings hostname:port.
     E.g. 10.10.10.10:3306.

     If port isn't specified 3306 will be assumed.
    """
    clone_mysql(
        ctx.obj['twindb_config'],
        source,
        destination,
        replication_user,
        replication_password,
        netcat_port=netcat_port,
        compress=compress
    )