Copy data from the remote Redis instance

These actions will erase all the existing content of the Scalingo redis
instance, don’t do it if you’ve precious data stored.

You need to own the source Redis connection information in order to copy its
content. Let’s consider the following example:

Host: ec2-34-242-7-204.eu-west-1.compute.amazonaws.com

Port: 10189

Password: pfe8060d30f6059b98a7ce7d

The following method configures temporarily the Redis instance hosted on
Scalingo to be become a slave of the remote your want to copy the content from.
Once the operation will be over, the replication link will be disabled, all the
keys and values will have been transfered.

At that point, the replication process has started, its duration is relative to
the amount of data contained by the remote database, it’s usually a matter of seconds.
To check if the process is over, look at the INFO command:

First check the master_link_status, it should be up, otherwise, it means
the replication process did not start, probably because of an error in the
connection information, check you can connect to the remote server with redis-cli

Once the master_sync_in_progress value becomes 0, it means the data
synchronization is over.

Restore configuration

Once the synchronization is over, you need to disable the replication configuration:

[host:port] > SLAVEOF NO ONE

That’s it, your Redis instance, owns all the data of your remote Redis, and is
ready to accept queries from your application.