Import data into a database

Redis Cloud

You can import an existing dataset into your Redis Cloud instance from an existing Redis server or an RDB file.

Warning:

Data imported into an existing database overwrites existing data.

  • If you import a dataset into the target database of an Active-Passive setup, the dataset will be overwritten by any changes to the source database.
  • If you import a dataset into one region in an Active-Active database, the dataset will also be replicated across regions.

Note:
Expired keys are not imported. As a result, the number of keys in the source and destination databases can be different after the import is complete.

Prerequisites

Make sure the Redis version of the source database is compatible with the database where the data will be imported.

Import from a Redis server

To import a dataset from any publicly available Redis Open Source server:

  1. Select Databases from the Redis Cloud console menu and then select the target database from the database list.
  2. Select Import. The Import dataset section and Import button.
  3. Enter the source database details:
    • Source type - Select Redis.
    • Redis Hostname/IP Address - Enter the hostname or the public IP address of the source Redis server. Do not include the port number in the hostname.
    • Redis port - Enter the port of the source Redis server if it is not the default value of 6379.
    • Password - Enter the password, if required by the source Redis database.
  4. Select Import.

Restore from an RDB file

If you have an RDB or a compressed RDB file from a previous backup, you can restore data from that file into your Redis Cloud database.

Select the tab for your storage location type.

  1. Select Databases from the Redis Cloud console menu and then select your database from the list.

  2. Select Import.

  3. Enter the details for the RDB file:

    • Source type - Select FTP or HTTP.
    • Source path - Enter the URL for the RDB file:
    <protocol>://[username][:password]@hostname[:port]/[path/]filename.rdb[.gz]
    

    Where:

    • protocol - Server protocol: ftp, ftps, http, https
    • username - Your username, if necessary
    • password - Your password, if necessary
    • hostname - Hostname or IP address of the server
    • port - Port number of the server, if not 6379
    • path - Path to the file, if necessary
    • filename - Filename of the RDB file, including the .gz suffix if the file is compressed
Note:
If your FTP username or password contains special characters such as @, \, or :, you must URL encode (also known as Percent encode) these special characters. If you don't, your database may become stuck.
  1. For sharded databases with multiple RDB files, select Add source to add another RDB file.
Warning:
For sharded databases with multiple RDB files, make sure to add every file before proceeding.
  1. Select Import.
RATE THIS PAGE
Back to top ↑