Exporting data from a Redis instance

Follow the instructions on this page to export an RDB backup of your Cloud Memorystore for Redis instance.

Exporting your Redis instance creates an RDB backup file of your data. The export operation stores the RDB backup in a Cloud Storage bucket. Your instance's performance may be temporarily slower for the duration of the export.

Before you begin

  1. Have a Cloud Storage bucket, with its default storage class set to Standard Storage and location type set to Regional, in the same project and same region as your Cloud Memorystore for Redis instance. See Creating storage buckets for instructions on how to create a Cloud Storage bucket.

  2. Have sufficient permissions to perform the export with your desired tool.

Export an RDB backup file to a Cloud Storage bucket

Console

  1. Go to the Cloud Memorystore page in the Google Cloud Platform Console.
    Cloud Memorystore

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

  3. Click the Export button in the top bar.

  4. Click the Browse button and navigate to the Cloud Storage bucket to which you want to export your RDB file.

  5. Use the default export file name, or enter your own file name that includes the.rdb file extension. For example:

    myexport.rdb

  6. Click the Select button.

  7. Click the Export button.

  8. Confirm that you want to export, and click the Export button.

Gcloud

  1. Export an RDB file to the Cloud Storage bucket referred to in step one of Before you begin by executing the following command:
    gcloud beta redis instances export gs://[BUCKET_NAME]/[FILE_NAME].rdb [INSTANCE_ID] --region=[REGION] --project=[PROJECT_ID]
    

Stop an ongoing export operation

Console

  1. Go to the Cloud Memorystore page in the Google Cloud Platform Console.
    Cloud Memorystore

  2. Click the Instance ID to view its information.

  3. Click the Stop export button.

Gcloud

To stop an export operation, first you need to find the operation ID by running the following command:

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

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

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

Instance availability and behavior while exporting

  • During the export process you can read and write to your Redis instance, however you cannot run admin operations on your instance such as scaling or upgrading.

  • Your instance may experience increased latency during the export operation.

  • The export can take anywhere from a few minutes to a few hours. For example, if you export a 10 GB instance with 8 GB of used memory, the export can take 5 minutes, and if you export a 120 GB instance with 100 GB of used memory, the export can take an hour. To monitor the progress of the export, check the instance details page, which displays the status of the operation.

What's next

Kunde den här sidan hjälpa dig? Berätta:

Skicka feedback om ...

Google Cloud Memorystore for Redis