Manage RDB snapshots

The page explains how to perform common tasks for the RDB snapshots feature. For details on RDB snapshots feature, refer to RDB snapshots overview .

Creating an instance that uses RDB snapshots

Console

  1. Go to the Memorystore for Redispage in the Google Cloud console.

    Memorystore for Redis

  2. Follow the instructions at Creating a Redis instance on a VPC network , but return to these instructions when you reach the Snapshotssection.

  3. Select Select Redis Database (RDB) snapshot.

    1. Choose a start time from the Start Timedropdown.
    2. Choose a snapshot interval from the Snapshot Intervaldropdown.
  4. Return to the Creating a Redis instance on a VPC network instructions for additional guidance on other Memorystore configurations, and click the Createbutton.

gcloud

To enable RDB snapshots on an instance, enter the following command replacing variables with appropriate values:

gcloud redis instances create instance-id 
--size= size 
--persistence-mode=rdb --rdb-snapshot-period= snapshot-interval 
--rdb-snapshot-start-time= time 
--region= region-id 

Where:

  • snapshot-interval is your desired interval. Accepted values are: 1h , 6h , 12h , and 24h .
  • time is your desired start time in the ISO 1801 format. For example: 2021-01-02T03:00:00Z .

Enabling snapshots on an existing instance

Console

  1. Go to the Memorystore for Redispage in the Google Cloud console.

    Memorystore for Redis

  2. Click the ID of the instance you want to add RDB snapshots to.

  3. Find the Snapshots section.

  4. Select Schedule Redis Database (RDB) snapshot.

    1. Choose a start time.

    2. Choose a snapshot interval.

  5. Click the Savebutton.

gcloud

Run the following command, replacing variables with appropriate values:

gcloud redis instances update instance_id 
--region= region 
--persistence-mode=rdb --rdb-snapshot-period= snapshot-interval 
--rdb-snapshot-start-time= time 

Where:

  • snapshot-interval is your desired interval. Accepted values are 1h , 6h , 12h , and 24h .
  • time is your desired start time in the ISO 1801 format. For example: 2021-01-02T03:00:00Z .

Adjusting snapshot schedule

gcloud

To adjust the schedule of RDB snapshots, enter the following command replacing variables with appropriate values:

gcloud redis instances update instance-id 
--rdb-snapshot-start-time= time 
--region= region 

Where:

  • time is your desired start time in the ISO 1801 format. For example: 2021-01-02T03:00:00Z .

Adjusting snapshot interval

Console

  1. Go to the Memorystore for Redispage in the Google Cloud console.

    Memorystore for Redis

  2. Click the Instance IDof the instance you'd like to edit.

  3. Click the Editbutton

  4. Find the Snapshotssection.

  5. Use the Snapshot Intervaldropdown to select your desired interval.

  6. Click the Savebutton.

gcloud

To change the snapshot interval, enter the following command replacing variables with appropriate values:

gcloud redis instances update instance-id 
--rdb-snapshot-period= snapshot-interval 
--region= region 

Where:

  • snapshot-interval is your desired interval. Acceptable values are: 1h , 6h , 12h , and 24h .

Pausing snapshots

gcloud

To pause snapshots, you must to set the snapshot schedule to a future time. When you want to unpause snapshots, you can re-adjust the time to when you want the next snapshot to occur. For example, to pause snapshots, enter the following command replacing variables with appropriate values:

gcloud redis instances update instance-id 
--rdb-snapshot-start-time=2022-06-10T03:00:00Z
--region= region 

Disabling RDB snapshots

Console

  1. Go to the Memorystore for Redispage in the Google Cloud console.

    Memorystore for Redis

  2. Click the Instance IDof the instance you'd like to edit.

  3. Click the Editbutton

  4. Unselect Schedule Redis Database (RDB) snapshot.

  5. Click the Savebutton.

gcloud

To disable RDB snapshots for a Redis instance, enter the following command replacing variables with appropriate values:

gcloud redis instances update instance-id 
--persistence-mode=disabled --region= region 

Monitoring RDB snapshots

Console

The Instance detailspage for Redis instance provides the following RDB snapshots metrics:

  • Frequency
  • Next snapshot
  • Last snapshot status
  • Time since last snapshot
  • Time of last restore

To view these details:

  1. Go to the Memorystore for Redispage in the Google Cloud console.

    Memorystore for Redis

  2. Click the Instance IDof your instance.

  3. View the snapshot information under the RDB Snapshotssection.

Cloud Monitoring

You can use Cloud Monitoring to view metrics for RDB snapshots.

For a list of available metrics for RDB snapshots, see RDB snapshots metrics .

What's next

Create a Mobile Website
View Site in Mobile | Classic
Share by: