Import data to a Redis instance

Note: You should only run an import operation if you are willing tooverwrite all current instance data. If the operation fails, you could lose allcurrent instance data.

Follow the instructions on this page to import an RDB backup into yourMemorystore for Redis instance.

Importing a Redis backup allows you to migrate data from another instance orrestore your instance data from a previous RDB backup. For additionalinformation about imports, exports, and best practices, seeImport and export overview.

Before you begin

  1. Have a Cloud Storage bucket that contains the RDB backup file that youwant to import. We recommend that you import from a bucket in the same regionas your Memorystore instance.

    To create a Cloud Storage bucket, seeCreate buckets.

    To upload a file into a Cloud Storage bucket, seeExporting data from a Redis instance orUpload objects from a filesystem.

  2. Havesufficient permissionsto perform the import.

Import an RDB backup file into a Redis instance

Console

  1. Go to theMemorystore for Redis page in the Google Cloud console.
    Memorystore for Redis

  2. Click your instance ID to view the instance details page.

  3. Click theImport button in the top bar.

  4. Click theBrowse button and navigate to the Cloud Storagebucket that stores the RDB file you want to import.

  5. Click the RDB file and then click theSelect button.

  6. Click theImport button.

  7. Confirm that you want to import, and click theImport button.

Gcloud

  1. Import the RDB file from the Cloud Storage bucket referred toin step one ofBefore you beginby executing the following command:
    gcloud redis instances import gs://[BUCKET_NAME]/[FILE_NAME].rdb [INSTANCE_ID] --region=[REGION] --project=[PROJECT_ID]

Stop an ongoing import operation

Console

  1. Go to theMemorystore for Redis page in the Google Cloud console.
    Memorystore for Redis

  2. Click the Instance ID to view its information.

  3. Click theStop import button.

Gcloud

To stop an import operation, first you need to find the operation ID byrunning the following command:

gcloud redis operations list --region=[REGION] -project=[PROJECT]

Once you have the operation ID, run the following command:

gcloud redis operations cancel [OPERATION_ID] --region=[REGION] --project=[PROJECT]

Instance availability and behavior while importing

  • Importing overwrites all current instance data, so make sure that you are okaywith your data being overwritten before you start an import.

  • Your Redis instance is unavailable during the import process. You cannotaccess instance data or modify the instance until the import is complete.

  • The import can take anywhere from a few minutes to a few hours. For example,if you import an 8 GB RDB file into a 10GB instance, the import can take 5minutes, and if you import a 100GB RDB file into a 120GB instance, the importcan take an hour. To monitor the progress of the import, check the instancedetails page, which displays the status of the operation.

  • An instance can only import backups from older Redis versions. An instancerunning Redis 5.0 can import an RDB exported from Redis 4.0, but an instancerunning Redis 4.0 cannot import an RDB from Redis 5.0.

What's next

Except as otherwise noted, the content of this page is licensed under theCreative Commons Attribution 4.0 License, and code samples are licensed under theApache 2.0 License. For details, see theGoogle Developers Site Policies. Java is a registered trademark of Oracle and/or its affiliates.

Last updated 2026-02-19 UTC.