Managing Clones

A clone is a new file system that is created based on a snapshot of an existing file system. Snapshots preserve the state of the data of a file system at a particular point in time. If you take snapshots of a file system at regular intervals, you can create clones of the file system as it existed at multiple points in its lifetime.

Cloned file systems are managed in the same way that any other file system is managed. See Managing File Systems.

Creating a File System Clone

Prerequisite

A snapshot of the file system must exist. See Creating a Snapshot.

Using the Compute Web UI

  1. On the Dashboard, click the File Storage/View File Systems button.

    If necessary, select a different compartment from the menu above the list of file systems.

  2. Click the name of the file system that you want to clone.

  3. In the Resources box on the file system details page, click Snapshots.

  4. For the snapshot that you want to clone, click the Actions menu and click Clone.

  5. In the Clone Snapshot from File System dialog, provide the following information:

    • Name: Enter a name for the clone.

    • Create in Compartment: Select the compartment where you want to create the clone.

    • Tagging: (Optional) Add defined or free-form tags for this instance as described in Adding Tags at Resource Creation. Tags can also be applied later.

  6. Click the Create File System button.

    The clone is created and the details page of the new file system clone is displayed.

    In the Clones section of the file system clone details page, Clone Parent is false and Clone Root is false. The name of the Parent File System is shown and is clickable, and the name of the Source Snapshot is shown and is clickable.

    If you click the name of the parent file system, the Clones section of the details page of that parent file system shows Clone Parent is true, Descendants is true, and Parent File System and Source Snapshot have no values.

Using the OCI CLI

  1. Gather the information that you need to run the command:

    • Compartment OCID (oci iam compartment list)

    • Display Name: The display name you want assigned to this file system clone

    • Source snapshot OCID (oci fs snapshot list)

  2. Run the create clone command.

    Syntax:

    oci fs file-system create --availability-domain AD-1 \
    --compartment-id compartment_OCID --display-name fs_clone_display_name \
    --source-snapshot-id fs_snapshot_OCID

    Example:

    oci fs file-system create --availability-domain AD-1 \
    --compartment-id ocid1.compartment.unique_ID \
    --display-name fs-1-clone-1 \
    --source-snapshot-id ocid1.snapshot.unique_ID

Deleting a File System Clone

Cloned file systems are managed in the same way that any other file system is managed; you delete a clone the same way you delete a file system. However, dependencies exist between file systems, snapshots, and clones. The appliance will not allow you to delete any resources that have a dependency. For details, see File Storage Overview in the Oracle Private Cloud Appliance Concepts Guide.

To delete a file system clone, see Deleting a File System.