Implement OCI File Storage Replication
This implementation uses the Oracle Cloud Infrastructure File Storage replication feature, which provides an automated cross-region replica for the OCI File Storage file systems.
The advantages of implementing the OCI File Storage replication are:
- There is no need to create and run scripts periodically, as in other replication cases. Once you set up the replication, it is performed automatically by Oracle Cloud Infrastructure.
- It is a general-purpose solution applicable to any OCI File Storage file system mounted by any mid-tier system. If you have multiple systems using OCI File Storage, then you can use the same approach in all of them.
- The information on the replicated file system is an exact copy of the primary; all the files in the file system are replicated.
The considerations of implementing OCI File Storage are:
- It requires steps to mount the replicated OCI File Storage in the secondary system. You can’t directly mount the target file systems; you first have to clone them, and then you can mount the cloned file system. However, you can overcome this complexity using the OCI Full Stack Disaster Recovery service to automate these steps in the switchover, failover, and validation operations.
- This technology may not be enough for many systems. If the system has more types of storage (for example, block volumes), then you will need to use a different replica technology for them.
Set Up Replication for OCI File Storage
To implement OCI File Storage replication, the following steps are required:
- Use the OCI Console to create the target OCI file systems in the secondary site.
- Enable the replica in the primary OCI file systems, pointing to the appropriate target OCI file system.
- Connect to secondary region’s mid-tier hosts and unmount the file system that are going to be replicated from primary.
- Using the OCI Console UI, detach, and discard the OCI file systems that will be replicated from the primary.
- Implement a way to manage the site-specific information by updating it with the appropriate information after the replica.
Example 1: Use OCI File Storage replication to replicate the mid-tier configuration and runtime
Note:
This example applies to any mid-tier system. As a reference, it uses an Oracle WebLogic Server system that follows the Oracle Fusion Middleware Enterprise Deployment Guide's best practices. This system has two OCI File Storage file systems: one for the shared configuration (the WebLogic Administration domain, keystores, and so on) and the other for the runtime data. But you can follow the same steps to replicate any OCI File Storage file system of a mid-tier.
Perform the following to set up the cross-region replica for the OCI File Storage file systems:
OCI file system replication is now ready.
Validate Replication for OCI File Storage
In a switchover or failover operation, the replicated information must be available and usable in the standby site before the processes are started. This is also required when you validate the secondary system (by opening the standby database in snapshot mode).
To make the replicated OCI File Storage file systems available and usable in the standby system, follow these actions for each file system.
Perform the following steps to use the replicated file systems in standby:Perform Ongoing Replication for OCI File Storage
Follow these recommendations for the ongoing replication when using this implementation.
- OCI automatically performs OCI File Storage replication in the background. The only thing you need to do during the lifecycle is ensure that the OCI File Storage file systems of the primary have the replica enabled.
- Consider using OCI Full Stack Disaster Recovery to automate the switchover and failover tasks. It provides the ability to run a switchover or failover plan with just one click using the OCI Console. It is very useful to simplify the execution of the tasks related to OCI File Storage replica.
- The replication feature is complementary to the snapshot feature, not a replacement. Ensure that you attach a snapshot policy for the OCI File Storage file systems as well. This will provide data protection in addition to the cross-region replica, allowing you to restore a file system to a point in time.
- Maintain the information that is specific to each site and keep it current up-to-date. For example, if the file system contains a folder with the artifacts to connect to an Autonomous Database, then maintain a backup copy of this folder. Ensure that you update the backup of the folder when you perform an update in the wallet. This way, it will be correctly restored in subsequent switchover and failovers.
- After a switchover or a failover operation, cleanup the unused file systems and change the replica direction. These actions are required to reverse the replica direction:
- Disable the previous replication from the previous primary and clean up (delete) the unused target file systems in the new primary.
- Enable the replica in the OCI File Storage file systems of the new primary.
- Delete the unused file systems in the new standby.