Skip to content

KeyMigrate with authentication #2463

@olsh

Description

@olsh

Can the KeyMigrate method be used against the target database with a password?
The migrate command supports AUTH option, but I didn't find it in the library.

Here is the code that I use

var source = ConnectionMultiplexer.Connect("127.0.0.1:6381");
var sourceDatabase = source.GetDatabase(5);
var sourceServer = source.GetServer("127.0.0.1", 6381);

var target = ConnectionMultiplexer.Connect("127.0.0.1:6379,password=my_password");
var targetEndPoint = target.GetEndPoints().Single();
await foreach (var key in sourceServer.KeysAsync(5))
{
    await sourceDatabase.KeyMigrateAsync(key, targetEndPoint, 5, 10000, MigrateOptions.Copy | MigrateOptions.Replace)
        .ConfigureAwait(false);
}

Metadata

Metadata

Assignees

No one assigned

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions