-
Notifications
You must be signed in to change notification settings - Fork 1.5k
Open
Labels
Description
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);
}