This command creates a cloned directory of a local snapshot, effectively restoring the snapshot data to the cluster.
The directory is instantly writable upon creation, and requests to read data from the directory can be read. Optionally, the clone can be background synced to the snapshot, which means that the data is fully copied to the cloned directory as a background task afterwards, such that when the copy is complete, read requests are all directed to the directory itself and are not dependent on the cloned snapshot.
Usage
snapshot clone --id ID --name NAME --target-path PATH --target-tenant-id ID [--background-sync]
Required Parameters
| Specifies the ID of the snapshot to use to create the clone. To retrieve snapshot IDs, run the snapshot list command. |
| Specifies a name for the snapshot clone. |
| Specifies a local path on the target tenant where you want the clone to reside. |
| Specifies the tenant on the local cluster to which you want to clone the snapshot. |
Options
| Causes the snapshot data to be copied from the source to the destination after the clone is created. During the copying stage, read requests are directed to the source if the requested data is not yet copied. When the copying is complete, the clone becomes a local directory. If not specified, this setting is disabled, in which case the snapshot data is not copied to the destination. Requests to read data from the cloned directory continue to read data from the cloned source on the remote peer. |
Example
vcli: admin> snapshot clone --id 230 --name local-ss --target-path /local-gss --target-tenant-id 1