This command creates either
-
a directory on the local cluster cloned from a snapshot on a remote replication peer, or
-
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.
globalsnapshotclone create --name NAME --target-path PATH --target-tenant-id ID [--source-cluster-id ID] [--source-path PATH] [--source-tenant TENANT_NAME] [--remote-source-snapshot name NAME] [--local-snapshot-id ID] [--background-sync]
Specifies a remote replication peer from which to clone a snapshot. Specify the ID of the peer, as listed by replicationpeer list. |
|
|
Specifies a path on the source cluster that you want to clone. The path must be protected by a snapshot. To retrieve paths on the remote peer that are protected by protected paths or by manual snapshots, run the cluster list-clone-snapshoted-paths-remote command. |
|
Specifies to which tenant on the source cluster the source path belongs. |
|
Use this option when cloning a snapshot on a remote peer, to specify the name of the snapshot of the source path you want to use to create the clone. To retrieve names of all available snapshots for a given source path on a given remote peer, run the cluster list-snapshoted-paths-remote command. |
|
Use this option when cloning a snapshot on the local peer, to specify which snapshot to use to create the clone. To retrieve snapshot IDs, run the snapshot list command. |
|
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 only copied to the destination for requests to read data from the cloned directory. |
The following example clones a remote snapshot to a local directory:
vcli: admin> globalsnapshotclone create --name remote-gss --target-path /a-remote --target-tenant-id 1 --source-cluster-id 1 --remote-source-snapshot a-1 --source-path /a/ --source-tenant default
The following example restores a local snapshot:
vcli: admin> globalsnapshotclone create --name local-gss --target-path /local-gss --target-tenant-id 1 --local-snapshot-id 29
Comments
0 comments
Article is closed for comments.