Managed Service for Redis provides automatic and manual database backups.
Managed Service for Redis uses AOF (append-only file) with forced write to disk every second: the appendfsync everysec parameter is set.
A backup of all cluster data (an RDB snapshot) is automatically created once a day and stored for 7 days. You can't disable automatic backups or change the retention period.
To restore a cluster from a backup, follow the instructions.
Backups can be automatic or manual. In both cases, the following scheme is used:
- The first backup and every seventh backup are full backups of all databases.
- Other backups are incremental and store only the data that has changed since the previous backup to save space.
After a backup is created, it's compressed for storage. The exact backup size isn't displayed.
The backup start time is set when creating or updating a cluster. By default, the backup process starts at 22:00 UTC (Coordinated Universal Time). The backup will start within half an hour of the specified time.
Backups in Managed Service for Redis are created based on a consistent snapshot of the process memory image, which is obtained by copying the original Redis process through a
fork() system call. Due to the specifics of the
fork() implementation in Linux, writing data to a Managed Service for Redis cluster host during a backup increases memory usage, since new, updated data is added to the total memory of the process (the Copy-on-Write mechanism).
This may cause the Managed Service for Redis hosts to run out of memory: they will be restarted with the backup process interrupted. We recommend that you choose a time to start a backup when the cluster is under the least load or increase RAM by increasing the host class.
Backups are only created on running clusters. If you don't use a Managed Service for Redis cluster around the clock, check the backup start time settings.
To learn how to manually create a backup, see Managing backups.
Storing backups in Managed Service for Redis:
Backups are stored in Yandex internal storage as logical dumps and are encrypted using GPG. Each cluster has its own encryption keys.
All backups (automatic or manual) are stored for 7 days.
Backup storage is not subject to quotas or limits for cluster storage space.
Backups are stored in object storage and do not take up space in cluster storage. If there are N free GB of space in the cluster, the storage of the first N GB of backups is free of charge.
For more information, see the Pricing policy for Managed Service for Redis.
Checking backup integrity
Backup integrity is checked on synthetic data using integration tests available in the service.
Checking backup recovery
To test the backup feature, restore a cluster from a backup and check the integrity of your data.