Tair (Redis OSS-compatible) instances use Redis Database (RDB) snapshots for data persistence. In-memory data that is captured at specific points in time is compressed and then persisted to files on disks. During the backup process, the performance of data retrieval is not affected. By default, instances are configured to back up data automatically once a day. You can modify the automatic backup policy based on your business requirements or manually create a temporary backup.
Background information
Tair (Redis OSS-compatible) instances use RDB snapshots for data persistence. In-memory data that is captured at specific points in time is persisted to files on disks. During the backup process, the performance of data retrieval is not affected.
By default, data is automatically backed up once a day for your instance. You can also manually create a backup at any time. Backup files can be retained only for seven days. To retain backup files for an extended period of time, you can download the backup files to your computer. For more information, see Download backup files.
Precautions
If a backup task for an instance is already in progress, another backup task cannot be initiated. We recommend that you initiate another backup task after the current backup task is completed.
By default, an instance backs up data on the replica node. If the data flashback feature is enabled for the instance, the instance backs up data on the master node.
Procedure
Log on to the console and go to the Instances page. In the top navigation bar, select the region in which the instance that you want to manage resides. Then, find the instance and click the instance ID.
In the left-side navigation pane, click Backup and Restoration.
Perform the following operations based on your business requirements.
Modify the automatic backup policy
In the upper-right corner, click Backup Settings.
In the panel that appears, specify Backup Cycle and Backup Time.
Retention Days: Backup files are retained for 7 days.
Backup Cycle: You can select one or more days of the week. By default, one backup is created per day.
Backup Time: You can specify a period of time in hours within a day. We recommend that you back up data during off-peak hours.
NoteThe time displayed in the console is in the same time zone as your computer.
Click OK.
Manually create a backup
In the upper-right corner, click Create Backup.
In the dialog box that appears, set Backup Expiration Policy and click OK.
Only cloud-native instances support the customization of manual backup expiration policies. Supported options:
Standard (default): This option indicates that the backup expiration policy aligns with the current automatic backup policy.
Independent: This option allows you to set a retention period for the manual backup data, which can range from 3 to 730 days.
Permanent: This option indicates that the manual backup data will never expire and will be retained for the lifetime of the instance. For example, you can perform a manual backup every Monday or at the beginning of each month and set Backup Expiration Policy to Permanent to ensure that the backup data is stored permanently.
NoteYou can perform up to 30 manual backups per day for a single instance. If the number of manual backups exceeds the limit, the
Exceeding the daily backup times of this DB instance.
error is reported. This limit is automatically lifted after 24 hours and does not affect the automatic backup.The expiration time of manual backup data can be extended.
FAQ
How do I delete backup data?
For cloud-native instances, you can directly click Delete in the Action column corresponding to the manual backup file. You cannot delete automatic backup data. Automatic backup data is automatically deleted after it expires.
Does modifying the backup policy of an instance affect the normal operation of the instance?
No. Modifying the backup policy of an instance does not affect the normal operation of the instance.
Am I able to run the SAVE or BGSAVE command to back up data for an instance?
No. You can click Create Backup in the console or call the CreateBackup operation to manually back up the data.
How do I perform multiple backups per day?
The automatic backup policy supports up to one backup per day. To perform backups more frequently, you can write code to call the CreateBackup operation at regular intervals to simulate manual backups. For more information, see the example for calling CreateBackup. The backed-up data is also included in the backup list.
NoteYou can also use the data flashback feature provided by Tair (Enterprise Edition). After you enable the data flashback feature for a Tair (Enterprise Edition) instance, the instance supports 24/7 data backups and allows you to restore data to a specific point in time within the previous seven days (point-in-time recovery, PITR). For more information, see Use data flashback to restore data by point in time.
After an instance expires or is released, is the backup data of the instance retained?
The backup data is also deleted. To retain the backup data for a long period of time, download backup files in advance.
Related API operations
API operation | Description |
Creates a backup for an instance. | |
Queries the backup policy of an instance. The backup policy includes the backup cycle and backup time. | |
Modifies the automatic backup policy of an instance. | |
ModifyBackupExpireTime | Extends the expiration time of manual backup data. |
References
For information about how to restore data, see Restore data from a backup set to a new instance.
For information about how to download a backup file to your computer, see Download backup files.