Take a snapshot to capture a volume’s data at one point in time. Protect it when you want to create volumes or images from it. You don’t have to detach a volume to snapshot it.
Before you begin
Create the snapshot
-
If the volume is attached to a running instance, quiesce the filesystem inside the guest when you need more than crash consistency. The snapshot is taken while the instance runs and captures the disk as a sudden power-off would.
-
Create the snapshot.
terminal origin storage create-snapshot --volume-urn <volume-urn>With the API, use the
createSnapshotmutation:GraphQL mutation { pvs { createSnapshot(input: { volumeUrn: "<volume-urn>" }) { urn status } } }The snapshot reports
PENDING. Note itsurn. -
Check the snapshot until it reports
status: COMPLETED.terminal origin storage get-snapshot --snapshot-urn <snapshot-urn>If it reports
ERROR, the copy failed. Delete it and take a new one.
Protect the snapshot
Protect the snapshot only after it reports COMPLETED. A protect request for a PENDING snapshot is refused, not queued.
-
Protect the snapshot.
terminal origin storage protect-snapshot --snapshot-urn <snapshot-urn>With the API, use the
protectSnapshotmutation:GraphQL mutation { pvs { protectSnapshot(input: { snapshotUrn: "<snapshot-urn>" }) { accepted message } } } -
Check the snapshot until it reports
protectionStatus: PROTECTED.terminal origin storage get-snapshot --snapshot-urn <snapshot-urn>If it reports
FAILED, the protection state is unknown. Protect it again. See Snapshot states.
The snapshot is now a clone source: status: COMPLETED and protectionStatus: PROTECTED.