Backup persists in-memory data to disk at regular intervals, enabling recovery after data loss or corruption. Tair (Redis OSS-compatible) supports three persistence policies—RDB, AOF, and Tair-Binlog—for different backup and restoration scenarios.
Persistence policies
RDB
RDB creates periodic snapshots of Redis data and saves them as RDB files on disk. RDB files are compact and portable, suitable for point-in-time backup and migration.
Open source Redis may block operations during RDB generation, with blocking time proportional to data volume. Tair (Redis OSS-compatible) implements non-blocking backup, so backup operations do not affect client requests.
By default, Tair (Redis OSS-compatible) instances back up data automatically once a day. You can modify the backup policy or manually create a temporary backup.
AOF
AOF logs all write operations, such as SET. When the AOF file grows large, the instance triggers an AOF rewrite to compact the file and reduce disk usage.
The AOF persistence policy for Tair (Redis OSS-compatible) instances is AOF_FSYNC_EVERYSEC, which flushes the AOF buffer to disk asynchronously every second, minimizing performance impact.
Tair-Binlog
Tair (Enterprise Edition) DRAM-based instances support RDB and AOF, and also optimize AOF with incremental archiving. This avoids performance degradation from AOF rewrite and enables point-in-time recovery (PITR)—restoring an instance or a specific key to any second as each write operation and its timestamp are saved. For more information, see Restore data to a point in time.
Backup and restoration solutions
Tair (Redis OSS-compatible) provides backup and restoration based on RDB, AOF, and AOF incremental archiving.
Category | Solution | Description |
Data backup | Tair (Redis OSS-compatible) automatically backs up instance data daily using RDB. You can modify the backup policy or manually create a temporary backup. | |
Backup files are retained for 7 days. Download backup files to your local machine for longer retention, such as for regulatory or compliance requirements. | ||
Data restoration | Create an instance from a backup set. The new instance contains the same data as the backup. Use this feature for data restoration, rapid workload deployment, or data verification. | |
Restore instance data to a specific second using AOF-based data flashback. This minimizes data loss from accidental operations and suits scenarios that require frequent point-in-time recovery. Note This feature is available only for Tair (Enterprise Edition) DRAM-based instances. |
Backup data protection
Tamper resistance: RDB backup data and Tair-Binlog data of Tair (Redis OSS-compatible) is stored in OSS with WORM (Write Once Read Many) tamper-proof protection.
Protection against malicious or accidental deletion:
Manual deletion: Only manual backup data can be deleted. Automatic backup data cannot be deleted.
Automatic deletion upon expiration: Expired backup data is automatically deleted. However, the automatic backup feature must remain enabled, with at least one automatic backup per week and a minimum retention of seven days. This ensures automatic backup data is never fully deleted.