Restez organisé à l'aide des collections
Enregistrez et classez les contenus selon vos préférences.
Cette page explique comment effectuer des tâches courantes pour la fonctionnalité d'instantanés de RDB.
Pour en savoir plus sur la fonctionnalité d'instantanés RDB, consultez la présentation des instantanés RDB.
Créer une instance qui utilise des instantanés RDB
Console
Accédez à la page Memorystore pour Redis dans la console. Google Cloud
Sélectionnez Sélectionner un instantané de base de données Redis (RDB).
Sélectionnez une heure de début dans le menu déroulant Heure de début.
Sélectionnez un intervalle d'instantané dans la liste déroulante Intervalle d'instantané.
Revenez aux instructions Créer une instance Redis sur un réseau VPC pour obtenir des conseils supplémentaires sur d'autres configurations Memorystore, puis cliquez sur le bouton Créer.
gcloud
Pour activer les instantanés RDB sur une instance, saisissez la commande suivante en remplaçant variables par les valeurs appropriées:
snapshot-interval correspond à l'intervalle souhaité. Les valeurs acceptables sont 1h, 6h, 12h et 24h.
Mettre en pause les instantanés
gcloud
Pour suspendre la création d'instantanés, vous devez définir la programmation d'instantanés sur une date ultérieure.
Lorsque vous souhaitez réactiver la mise en veille des instantanés, vous pouvez ajuster l'heure à laquelle vous souhaitez que le prochain instantané soit créé. Par exemple, pour suspendre les instantanés, saisissez la commande suivante en remplaçant variables par les valeurs appropriées:
Sauf indication contraire, le contenu de cette page est régi par une licence Creative Commons Attribution 4.0, et les échantillons de code sont régis par une licence Apache 2.0. Pour en savoir plus, consultez les Règles du site Google Developers. Java est une marque déposée d'Oracle et/ou de ses sociétés affiliées.
Dernière mise à jour le 2025/09/05 (UTC).
[[["Facile à comprendre","easyToUnderstand","thumb-up"],["J'ai pu résoudre mon problème","solvedMyProblem","thumb-up"],["Autre","otherUp","thumb-up"]],[["Difficile à comprendre","hardToUnderstand","thumb-down"],["Informations ou exemple de code incorrects","incorrectInformationOrSampleCode","thumb-down"],["Il n'y a pas l'information/les exemples dont j'ai besoin","missingTheInformationSamplesINeed","thumb-down"],["Problème de traduction","translationIssue","thumb-down"],["Autre","otherDown","thumb-down"]],["Dernière mise à jour le 2025/09/05 (UTC)."],[],[],null,["# Manage RDB snapshots\n\nThe page explains how to perform common tasks for the RDB snapshots feature.\nFor details on RDB snapshots feature, refer to [RDB snapshots overview](/memorystore/docs/redis/rdb-snapshots).\n| **Note:** During the Preview stage of the RDB Snapshots feature you cannot enable RDB Snapshots for existing Redis instances. You can only enable snapshots when creating a new Redis instance.\n\nCreating an instance that uses RDB snapshots\n--------------------------------------------\n\n### Console\n\n1. Go to the **Memorystore for Redis** page in the Google Cloud console.\n\n [Memorystore for Redis](https://console.cloud.google.com/memorystore/redis/instances?)\n2. Follow the instructions at [Creating a Redis instance on a VPC network](/memorystore/docs/redis/create-manage-instances#creating_a_redis_instance_on_a_vpc_network),\n but return to these instructions when you reach the **Snapshots** section.\n\n3. Select **Select Redis Database (RDB) snapshot**.\n\n 1. Choose a start time from the **Start Time** dropdown.\n 2. Choose a snapshot interval from the **Snapshot Interval** dropdown.\n4. Return to the [Creating a Redis instance on a VPC network](/memorystore/docs/redis/create-manage-instances#creating_a_redis_instance_on_a_vpc_network)\n instructions for\n additional guidance on other Memorystore configurations,\n and click the **Create** button.\n\n### gcloud\n\nTo enable RDB snapshots on an instance, enter the following command\nreplacing \u003cvar translate=\"no\"\u003evariables\u003c/var\u003e with appropriate values: \n\n```\ngcloud redis instances create instance-id --size=size --persistence-mode=rdb --rdb-snapshot-period=snapshot-interval --rdb-snapshot-start-time=time --region=region-id\n```\n\nWhere:\n\n- \u003cvar translate=\"no\"\u003esnapshot-interval\u003c/var\u003e is your desired interval. Accepted values are: `1h`, `6h`, `12h`, and `24h`.\n- \u003cvar translate=\"no\"\u003etime\u003c/var\u003e is your desired start time in the ISO 1801 format. For example: `2021-01-02T03:00:00Z`.\n\nEnabling snapshots on an existing instance\n------------------------------------------\n\n### Console\n\n1. Go to the **Memorystore for Redis** page in the Google Cloud console.\n\n [Memorystore for Redis](https://console.cloud.google.com/memorystore/redis/instances?)\n2. Click the ID of the instance you want to add RDB snapshots to.\n\n3. Find the *Snapshots* section.\n\n4. Select **Schedule Redis Database (RDB) snapshot**.\n\n 1. Choose a start time.\n\n 2. Choose a snapshot interval.\n\n5. Click the **Save** button.\n\n### gcloud\n\nRun the following command, replacing \u003cvar translate=\"no\"\u003evariables\u003c/var\u003e with appropriate\nvalues: \n\n```\ngcloud redis instances update instance_id --region=region --persistence-mode=rdb --rdb-snapshot-period=snapshot-interval --rdb-snapshot-start-time=time\n```\n\nWhere:\n\n- \u003cvar translate=\"no\"\u003esnapshot-interval\u003c/var\u003e is your desired interval. Accepted values are `1h`, `6h`, `12h`, and `24h`.\n- \u003cvar translate=\"no\"\u003etime\u003c/var\u003e is your desired start time in the ISO 1801 format. For example: `2021-01-02T03:00:00Z`.\n\nAdjusting snapshot schedule\n---------------------------\n\n### gcloud\n\nTo adjust the schedule of RDB snapshots, enter the following command\nreplacing \u003cvar translate=\"no\"\u003evariables\u003c/var\u003e with appropriate values: \n\n```\ngcloud redis instances update instance-id --rdb-snapshot-start-time=time --region=region\n```\n\nWhere:\n\n- \u003cvar translate=\"no\"\u003etime\u003c/var\u003e is your desired start time in the ISO 1801 format. For example: `2021-01-02T03:00:00Z`.\n\nAdjusting snapshot interval\n---------------------------\n\n### Console\n\n1. Go to the **Memorystore for Redis** page in the Google Cloud console.\n\n [Memorystore for Redis](https://console.cloud.google.com/memorystore/redis/instances?)\n2. Click the **Instance ID** of the instance you'd like to edit.\n\n3. Click the **Edit** button\n\n4. Find the **Snapshots** section.\n\n5. Use the **Snapshot Interval** dropdown to select your desired interval.\n\n6. Click the **Save** button.\n\n### gcloud\n\nTo change the snapshot interval, enter the following command\nreplacing \u003cvar translate=\"no\"\u003evariables\u003c/var\u003e with appropriate values: \n\n```\ngcloud redis instances update instance-id --rdb-snapshot-period=snapshot-interval\n--region=region\n```\n\nWhere:\n\n- \u003cvar translate=\"no\"\u003esnapshot-interval\u003c/var\u003e is your desired interval. Acceptable values are: `1h`, `6h`, `12h`, and `24h`.\n\nPausing snapshots\n-----------------\n\n### gcloud\n\nTo pause snapshots, you must to set the snapshot schedule to a future time.\nWhen you want to unpause snapshots, you can re-adjust the time to when you\nwant the next snapshot to occur. For example, to pause snapshots, enter the\nfollowing command replacing \u003cvar translate=\"no\"\u003evariables\u003c/var\u003e with appropriate values: \n\n```\ngcloud redis instances update instance-id --rdb-snapshot-start-time=2022-06-10T03:00:00Z\n--region=region\n```\n| **Note:** Pausing snapshots will result in stale backups and can result in the instance being recovered with stale data. If you need to pause snapshots for a long period of time, consider disabling RDB snapshot instead.\n\nDisabling RDB snapshots\n-----------------------\n\n### Console\n\n1. Go to the **Memorystore for Redis** page in the Google Cloud console.\n\n [Memorystore for Redis](https://console.cloud.google.com/memorystore/redis/instances?)\n2. Click the **Instance ID** of the instance you'd like to edit.\n\n3. Click the **Edit** button\n\n4. Unselect **Schedule Redis Database (RDB) snapshot**.\n\n | **Note:** This action stops ongoing snapshots and deletes existing snapshots.\n5. Click the **Save** button.\n\n### gcloud\n\nTo disable RDB snapshots for a Redis instance, enter the following command\nreplacing \u003cvar translate=\"no\"\u003evariables\u003c/var\u003e with appropriate values: \n\n```\ngcloud redis instances update instance-id --persistence-mode=disabled --region=region\n```\n| **Note:** Running this command stops ongoing snapshots and deletes existing snapshots.\n\nMonitoring RDB snapshots\n------------------------\n\n### Console\n\nThe **Instance details** page for Redis instance provides the following RDB\nsnapshots metrics:\n\n- Frequency\n- Next snapshot\n- Last snapshot status\n- Time since last snapshot\n- Time of last restore\n\nTo view these details:\n\n1. Go to the **Memorystore for Redis** page in the Google Cloud console.\n\n [Memorystore for Redis](https://console.cloud.google.com/memorystore/redis/instances?)\n2. Click the **Instance ID** of your instance.\n\n3. View the snapshot information under the **RDB Snapshots** section.\n\n### Cloud Monitoring\n\nYou can use [Cloud Monitoring](/memorystore/docs/redis/monitoring-instances)\nto view metrics for RDB snapshots.\n\nFor a list of available metrics for RDB snapshots, see [RDB snapshots metrics](/memorystore/docs/redis/monitoring-metrics#rdb_snapshots_metrics).\n\nWhat's next\n-----------\n\n- See the overview of [RDB Snapshots](/memorystore/docs/redis/rdb-snapshots) for Memorystore.\n- Learn more about [importing and exporting](/memorystore/docs/redis/import-export-overview) data."]]