OCI Cache Backup and Restore
Create snapshots of your OCI Cache clusters, manage backups, and restore clusters from backups.
Backups capture the state of a cluster at a specific point in time. Use backups for disaster recovery, migration, or testing. The backup feature lets you export and import backups so you can protect and recover data as needed.
- Create backups: Take an RDB snapshot of an OCI Cache instance.
- Manage backups: Edit backup metadata and set retention periods.
OCI Cache processes all backup and restore operations as work requests. When you start a backup, you receive a 202 Accepted response. You can track progress using the WorkRequest ID from ACCEPTED to IN_PROGRESS and SUCCEEDED.
Creating Backups
Start creating a backup from an existing OCI Cache cluster by selecting the backup option in the OCI Cache Console action menu. This action creates a point-in-time snapshot of the cache's data.
Backup Type
OCI Cache supports on-demand backups, so you can take a backup whenever required.
Manual backup (on-demand): Start manual backups from the Console, CLI, or API at any time.
You can take manual backups from primary or replica nodes. Taking backups from the primary node captures the most current data, but might impact cluster performance during the snapshot. Creating backups from a replica node can help reduce performance impact on the primary node.
Backup Retention Period
- Retention period:You can set the retention period from 1 to 35 days. The default retention period is 7 days.
- Maximum retention: The maximum retention period is 35 days.
- Validation: If you specify an invalid retention period, OCI Cache displays an error and does not update the retention setting.
Exporting and Importing Backups
OCI Cache supports exporting and importing data for migration and long-term storage.
Before exporting to or importing from Object Storage, ensure that you set the required IAM policy so OCI Cache can access the target bucket.
- Export: Export a managed backup to a user-owned Object Storage bucket. Use exports for long-term archiving (longer than the 35-day retention), or to migrate across regions.
- Import: Initialize a cluster using a Redis or Valkey database file from Object Storage. Use imports to migrate Redis or Valkey workloads into OCI Cache.
Restoring from a Backup
To restore from a backup, create a cluster from an active backup in OCI Cache.
During restore, OCI Cache enforces compatibility with the source backup: The cache engine and cluster mode cannot be changed, sharded clusters must use the same shard count as the source, and memory per node must be equal to or greater than the source cluster. You can adjust the number of nodes as needed. The review page shows the selected backup and indicates that the cluster is being created from a backup.
Security and Access Control
OCI Identity and Access Management (IAM) controls access to backup and restore features.
To perform backup and restore actions, your IAM group must have the correct permissions. See OCI Cache IAM Policies.
- OCI Cache service policies: OCI Cache uses its own service principal to transfer backups between the service-managed bucket and your buckets. Because the service principal does not have default access to your Object Storage, you must grant the
redis-servicepermission to read from and write to your bucket. - Object Storage policies: The Object Storage service performs data transfers on behalf of OCI Cache. Authorizing the wildcard pattern
request.service.name = /objectstorage-*/enables this delegation across all OCI regions and prevents regional permission errors during the transfer process.
Pricing
You are charged for the underlying Block Volume and Object Storage resources used:
- Object Storage: You pay for the storage used to retain backup copies in Object Storage by the OCI Cache service.
- Block Volume: You pay for the Block Volume resources used by the OCI Cache service during backup creation.