Creating a Replication

On Compute Cloud@Customer, creating a File Storage replication resource also creates an associated replication target resource. Data is replicated from the source file system to the target file system at the interval you specify.

A source file system can have at most three replication resources, including any replication resources for this source file system that are in state Failed. The replication resources can have different replication intervals. Therefore, the content of the target file systems could be different at a specific point in time.

The target file system is an existing file system that you specify. The target file system has the following restrictions:

  • Cannot be a file system that has ever been mounted for export.

  • Must be on a different infrastructure than the infrastructure that the source file system is on.

  • Must be in the same pool (capacity or performance vpusPerGB) on the target infrastructure that the source file system is in on the source infrastructure. Attempting to apply the replication snapshot to a file system in a different pool will fail.

If the source file system was created from a snapshot, then the data being replicated to the target file system includes the data from the snapshot as a whole. The data from the snapshot is not replicated separately.

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 are not replicated.

The replication resource is created immediately. The first replication operation starts as soon as the replication resource is active. The initial replication operation can take hours depending on the amount of data in the source file system.

After the initial replication operation completes, replication operations are performed according to the specified replication interval. The replication interval is the number of minutes between replication snapshots. The default value is 60 minutes. The value of the replication interval must be one of the following: 5, 10, 15, 20, 30, 60, 120, 240, 480, 720, 1440 (one day), 10080 (one week), or 43200 (one month).

  • Get the OCID for the file system that you plan to use for the target file system. Only a file system that has never been exported can be used as a target file system.

    1. In the Compute Cloud@Customer Console navigation menu, select File Storage, then select File Systems.
    2. On the list, select the name of the file system that you want to use as the source file system to replicate.

    3. On the details page for the selected source file system, the Targetable parameter value must be true.

    4. Scroll to the Resources section, select Replications, and select the Create Replication button.

    5. On the Create Replication dialog, enter the following information:

      • Name: Enter a meaningful display name for the replication resource. Avoid entering confidential information.

      • Target File System: Enter the OCID of the file system that you want to use for the target file system.

      • Replication interval: Enter the replication interval in minutes.

      • Tagging: (Optional) Add one or more tags to this resource. Tags can also be applied later. For more information about tagging resources, see Resource Tags.

    6. Select the Create Replication button on the dialog.

      The replication resource is created and the initial replication operation begins.

  • Use the oci fs replication create command to create a replication resource. Use the --source-id option to specify the file system to use as the source file system and use the --target-id option to specify the file system to use as the target file system. The replication target resource is created automatically when you create this replication resource. The --display-name and --replication-interval are optional.

    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 interval_in_minutes

    For a complete list of CLI commands, flags, and options, see the Command Line Reference.

  • Use the CreateReplication operation to create a replication resource.

    For information about using the API and signing requests, see REST APIs and Security Credentials. For information about SDKs, see Software Development Kits and Command Line Interface.