Creating a Replication

Creating a File Storage replication resource automatically creates an associated replication target resource. Data is replicated from the source file system to the target file system at the interval you specify.

Tags applied to a replication resource are copied to the automatically created replication target resource.

Replicated data in the target file system has the same file and folder structure, snapshots, metadata, and permissions settings as the source file system. File system resource-specific data such as file locks, encryption keys, and tags aren't replicated.

Replications require an unexported target file system that you can replicate data to. For the requirements for target file systems, see Limitations and Considerations. You can choose to create the target file system before you begin creating the replication, or you can create it along with the replication.

Tip

Before creating a replication for a file system, you can estimate how long the initial process will take.

The replication is created immediately. The first delta cycle starts as soon as the replication is active. The initial replication can take hours depending on the amount of data that's in the source file system.

    1. Open the navigation menu and click Storage. Under File Storage, click File Systems.
    2. In the List scope section, under Compartment, select a compartment.
    3. Click the name of the file system that you want to replicate.
    4. On the file system's details page, under Resources, click Replications.
    5. Click Create Replication.
    6. In the Create replication panel, provide the required information:

      • Name: Enter a user-friendly name for the replication. You can change this name later. Avoid entering confidential information.
      • Select one of the following options:

        • Use existing target File System: Enter the Target File System OCID of an unexported file system.
          Tip

          If you have an existing file system that was used as the replication target for this source, and you never exported that target file system or created or deleted snapshots on the file system after deleting the replication resource, you can use that file system as a replication target again. This can avoid a full base copy.
        • Create new target File System: Enter information for the new target file system. For details about individual fields, see Creating a File System.
          Note

          When creating a new target file system, you need to specify the Target region. For more information, see Recommended Target Regions.
      • Replication interval: Enter the replication interval in minutes. The replication interval determines the frequency of data replication. If you don't provide a value, the replication interval recommended by the replication estimator is used. If the replication estimator can't provide a recommendation, the replication uses the default value of 60 minutes. The minimum allowed value is 15 minutes.
      • (Optional) To add tags to the replication, click Show tagging options.

        If you have permissions to create a resource, then you also have permissions to apply free-form tags to that resource. To apply a defined tag, you must have permissions to use the tag namespace. For more information about tagging, see Resource Tags. If you're not sure whether to apply tags, skip this option or ask an administrator. You can apply tags later.

    7. To create the replication, click Create.
    8. (Optional) To save the configuration as a Resource Manager stack, click Save as stack. For more information, see Managing Stacks.
  • Use the fs replication create command and required parameters to create a replication:

    oci fs replication create --compartment-id <compartment_OCID> --display-name "<Replication1>" --source-id <source_file_system_OCID> --target-id <target_file_system_OCID> --replication-interval 600

    For a complete list of parameters and values for CLI commands, see the CLI Command Reference.

  • Run the CreateReplication operation to create a replication.

    For information about using the API and signing requests, see REST API documentation and Security Credentials. For information about SDKs, see SDKs and the CLI.