[[["易于理解","easyToUnderstand","thumb-up"],["解决了我的问题","solvedMyProblem","thumb-up"],["其他","otherUp","thumb-up"]],[["很难理解","hardToUnderstand","thumb-down"],["信息或示例代码不正确","incorrectInformationOrSampleCode","thumb-down"],["没有我需要的信息/示例","missingTheInformationSamplesINeed","thumb-down"],["翻译问题","translationIssue","thumb-down"],["其他","otherDown","thumb-down"]],["最后更新时间 (UTC):2025-09-03。"],[],[],null,["# About RDB persistence\n\nThis page gives an overview of RDB persistence on Memorystore for Valkey.\n\nTo learn how to enable, disable, and monitor RDB persistence, see\n[Manage persistence](/memorystore/docs/valkey/manage-persistence).\n\nFor information about best practices for RDB persistence, see\n[Persistence best practices](/memorystore/docs/valkey/general-best-practices#persistence_best_practices).\n\nThe RDB persistence feature protects your data by saving snapshots of your data\non durable storage. You choose the frequency of these snapshots by selecting a\nsnapshot interval ranging from a minimum of 1 hour to a maximum of 24 hours. If\nnode failures occur, data is recovered even in cases where failover is not possible.\n\nNodes with replicas prioritize data recovery from the replica. However, if\nboth the primary and replica fail simultaneously, nodes recover from the most\nrecent snapshot.\n| - Shards that are added by horizontally scaling up your instance aren't included in snapshots until the next scheduled snapshot time.\n| - If you [enable or disable persistence](/memorystore/docs/valkey/manage-persistence#enable_rdb_persistence_for_an_existing_instance) for an existing instance, then the instance might need to perform [maintenance](/memorystore/docs/valkey/about-maintenance).\n\nRDB persistence adds no additional cost to your instance billing. This feature\nis ideal for use cases where a small degree of data staleness after recovery is\nacceptable. Because Memorystore uses snapshots for automated\nrecovery, snapshots aren't available for manual restores. You should also note\nthat only the most recent successful snapshot is retained.\n\nMemorystore for Valkey also supports AOF persistence, but you must choose either\nthe AOF or RDB persistence mode, because both can't be enabled at the same time.\nFor information about choosing between the two persistence modes, see\n[Persistence overview](/memorystore/docs/valkey/persistence-overview).\nFor the best possible availability, we recommend using\n[a highly available instance](/memorystore/docs/valkey/ha-and-replicas)\nin addition to enabling persistence.\n\nSnapshot scheduling\n-------------------\n\nSnapshot scheduling is determined by two settings: the snapshot start time, and\nthe snapshot interval. The intervals you can set are `1h`, `6h`, `12h`, and\n`24h`. For example, if you set the start time to 4 AM and the interval to one\nhour, the snapshots start at 4 AM on the day they are enabled, and continue\nevery hour after that.\n\nSnapshot schedules are evaluated in the UTC time zone, therefore local time zones with daylight\nsavings shifts will expereince schedule adjustments. For example, at the\nbeginning and end of DST in the US, the local start times of your\nsnapshot schedule jobs move forward or backward by an hour if your time zone\nhonors DST changes.\n\n### Pausing snapshots\n\nYou may run into scenarios where you want to temporarily pause taking RDB snapshots for a certain\nperiod of time. This could be to ensure there are no performance impacts during critical events or\nto temporarily disable snapshots to troubleshoot performance issues.\n\nTo pause snapshots, you must set the start time to the future. If you do this, the last snapshot is\nretained and is used in the event of a recovery. To resume snapshots, adjust the snapshot schedule to\nwhen you want the next snapshot to occur. To learn more about adjusting snapshot schedules,\nsee [Adjust RDB snapshot interval](/memorystore/docs/valkey/manage-persistence#adjust_rdb_snapshot_interval).\n\nRecovery behavior\n-----------------\n\nMemorystore for Valkey nodes failover to replicas as the primary recovery mechanism, rather than loading\nfrom a snapshot. However, if a node fails and can't recover from a replica, the node recovers from a snapshot.\n\n### Data consistency on recovery\n\n| **Important:** An RDB snapshot is a point in time snapshot of node data based on the snapshot interval you set. Your application must be able to tolerate some staleness of data on recovery.\n\nWhen enabled, RDB persistence makes a best effort to ensure backups are taken on the specified interval.\nSnapshots can fail for a number of reasons. If the snapshot fails consecutively on multiple intervals, the\nlast available backup can be arbitrarily stale.\n\nThe worst case data staleness for a recovery from a snapshot is the sum of the specified interval since the\nlast good snapshot started and the time to save the next snapshot to storage. In the case of a recovery\nincident, use the [`rdb_last_success_ages`](/memorystore/docs/valkey/supported-monitoring-metrics#persistence_metrics)\nmetric to view the timeframe for data staleness.\n\n### Recovery time\n\nIf a node fails and needs to recover data from a snapshot, the node is unavailable during recovery. Recovery\ntime depends on the size of the snapshot.\n\n### Snapshot failure\n\nAny failed snapshot is retried immediately with exponential backoff from 5 to 300 seconds. Consecutive\nsnapshot failures increase data staleness in the event of a recovery.\n\n### Recovery failure\n\nRecovery failures are rare but can happen. If a recovery failure occurs, the node retries repeatedly\nuntil it recovers successfully.\n\nMonitoring snapshots\n--------------------\n\nIt's important to monitor snapshots and set alerts for failed snapshots. For information about best\npractices for RDB persistence, see [RDB persistence best practices](/memorystore/docs/valkey/general-best-practices#persistence_best_practices).\nFailed snapshots can indicate overloaded nodes that may continue to have difficulty recovering from the\nsnapshot.\n\nFor a list of metrics available for monitoring snapshots, see\n[Persistence metrics](/memorystore/docs/valkey/supported-monitoring-metrics#persistence_metrics).\n\n### Managing performance impact\n\nYou can monitor the performance impact a snapshot has on your Memorystore instance by viewing the metrics available through [Cloud Monitoring](/memorystore/docs/valkey/monitor-instances) such as CPU usage and memory usage."]]