Cloning a File System
Clone a File Storage file system.
Before you can clone a file system, at least one snapshot must exist for the file system. For more information, see Creating a Snapshot. The clone is a copy of the file system data as it exists at the date and time that the selected snapshot was taken.
When you clone a file system, you can decide whether to detach the clone from its parent to create an independent file system. For more information, see Detaching a Clone.
Hydration begins immediately upon instantiation of the clone. To view the clone's hydration status, source snapshot, parent file system, and other cloning information, visit the details page of the cloned file system. For more information, see Getting a File System's Details.
You can export, mount, and use the clone immediately for READ or WRITE operations after you create it. See Creating an Export and Mounting File Systems for more information. Cloned file systems are managed in the same way that any other file system is managed.
- Open the navigation menu and click Storage. Under File Storage, click File Systems.
- In the List scope section, under Compartment, select a compartment.
- Click the name of the file system that you want to clone.
- On the file system's details page, under Resources, click Snapshots.
- In the Snapshots list, find the snapshot that you want to use as the source of the clone, click the , and then click Clone.
- In the Create Clone panel, specify the details about the clone that aren't inherited from the parent file system. You can choose to accept the provided system defaults, or change them by clicking Edit details.
- Name: File Storage service creates a default name using
FileSystem-YYMMDD-HHMM
. Optionally, change the default name for the file system. It doesn't have to be unique; an Oracle Cloud Identifier (OCID) uniquely identifies the file system. Avoid entering confidential information. - Create in Compartment: Specify the compartment you want to create the clone of the file system in.
-
Encryption: File systems use Oracle-managed keys by default, which leaves all encryption-related matters to Oracle. Optionally, you can encrypt the data in this file system using your own Vault encryption key.NoteTo use Vault for your encryption needs, select Encrypt using customer-managed keys. Select the vault compartment and vault that contains the master encryption key that you want to use, and then select the master encryption key compartment and master encryption key.
Only symmetric Advanced Encryption Standard (AES) keys are supported for file system encryption.Caution
Be sure to back up your vaults and keys. Deleting a vault and key otherwise means losing the ability to decrypt any resource or data that the key was used to encrypt. For more information, see Backing Up and Restoring Vaults and Keys. (Optional) To add tags to the file system, 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.
- Name: File Storage service creates a default name using
- (Optional) Detach the file system from the parent file system by selecting Detach clone.
- Click Create.
Use the
fs file-system create
command and the--source-snapshot-id
parameter to specify the snapshot that you want to use as the source for the clone:oci fs file-system create --availability-domain <target_availability_domain> --display-name "<Clone Name>" --clone-attach-status <attach_or_detach> --compartment-id <target_compartment_id> --kms-key-id <key_OCID> --source-snapshot-id <snapshot_OCID>
Use the
--clone-attach-status
parameter to detach the clone from its parent.For a complete list of parameters and values for CLI commands, see the CLI Command Reference.
Run the CreateFileSystem operation and include the
sourceSnapshotId
parameter to clone a file system. Include the optionalcloneAttachStatus
parameter to detach the cloned file system.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.