Cloning a Volume
You can create a clone from a volume using the Block Volume service. Cloning enables you to make a copy of an existing block volume without needing to go through the backup and restore process.
A cloned volume is a point-in-time direct disk-to-disk deep copy of the source volume, so all the data that is in the source volume when the clone is created is copied to the clone volume. Any subsequent changes to the data on the source volume are not copied to the clone. Since the clone is a copy of the source volume it will be the same size as the source volume unless you specify a larger volume size when you create the clone.
The clone operation occurs immediately, and you can attach and use the cloned volume as a regular volume as soon as the state changes to available. At this point, the volume data is being copied in the background, and can take up to thirty minutes depending on the size of the volume.
There is a single point-in-time reference for a source volume while it is being cloned, so if the source volume is attached when a clone is created, you need to wait for the first clone operation to complete from the source volume before creating additional clones. If the source volume is detached, you can create up to ten clones from the same source volume simultaneously.
You can only create a clone for a volume within the same region, availability domain and tenant. You can create a clone for a volume between compartments as long as you have the required access permissions for the operation.
For more information about the Block Volume service and cloned volumes, see the Block Volume FAQ.
Avoid entering confidential information when assigning descriptions, tags, or friendly names to your cloud resources through the Oracle Cloud Infrastructure Console, API, or CLI.
Differences Between Block Volume Clones and Backups
Consider the following criteria when you decide whether to create a backup or a clone of a volume.
|Volume Backup||Volume Clone|
|Description||Creates a point-in-time backup of data on a volume. You can restore multiple new volumes from the backup later in the future.||Creates a single point-in-time copy of a volume without having to go through the backup and restore process.|
Retain a backup of the data in a volume, so that you can duplicate an environment later or preserve the data for future use.
Meet compliance and regulatory requirements, because the data in a backup remains unchanged over time.
Support business continuity requirements.
Reduce the risk of outages or data mutation over time.
Rapidly duplicate an existing environment. For example, you can use a clone to test configuration changes without impacting your production environment.
|Speed||Slower (minutes or hours)||Faster (seconds)|
|Cost||Lower cost||Higher cost|
|Storage location||Object Storage||Block Volume|
|Retention policy||Policy-based backups expire, manual backups do not expire||No expiration|
|Volume groups||Supported. You can back up a volume group.||Supported. You can clone a volume group.|
Using the Console
- Open the navigation menu. Under Core Infrastructure, go to Block Storage and click Block Volumes.
- In the Block Volumes list, click the volume that you want to clone.
- In Resources, click Clones.
Click Create Clone.
Specify a name for the clone.
If you want to clone the block volume to a larger size volume, check Custom Block Volume Size (GB) and then specify the new size. You can only increase the size of the volume, you cannot decrease the size. If you clone the block volume to a larger size volume, you need to extend the volume's partition. See Extending the Partition for a Block Volume for more information.
If you want to change the elastic performance setting when cloning the volume, check Custom Block Volume Performance and select the elastic performance setting you want the volume clone to use. See Block Volume Elastic Performance for more information. You can also change the elastic performance setting after you have cloned the volume, see Block Volume Elastic Performance. If you leave Custom Block Volume Performance unchecked, the cloned volume will use the same elastic performance setting as the source volume.
Click Create Clone.
The volume is ready use when its icon lists it as AVAILABLE in the volume list. At this point, you can perform various actions on the volume such as creating a clone from the volume, attaching it to an instance, or deleting the volume.
Using the API
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.