SandboxHandle
handle.snapshot()
Example
Example
Parameters
nameStringSnapshot name.
Returns
Hash
String keys: digest, reference, reference_kind, and size_bytes.
Snapshot
Microsandbox::Snapshot.open()
Parameters
referenceStringSnapshot reference or name.
Returns
Snapshot
Open a snapshot using the selected backend.
Microsandbox::Snapshot.get()
Parameters
nameStringSnapshot reference or name.
Returns
SnapshotHandle
Look up snapshot metadata using the selected backend.
Microsandbox::Snapshot.list()
Returns
Array<SnapshotHandle>
List snapshots using the selected backend.
Microsandbox::Snapshot.remove()
Parameters
nameStringSnapshot reference or name.
forceBooleanForce removal; optional positional argument, defaults to false.
Returns
nil
No return value.
Microsandbox::Snapshot.save()
Parameters
referenceStringSnapshot reference.
output_pathStringDestination archive path on the host.
with_parentsBooleanInclude parent snapshots; defaults to false.
with_imageBooleanInclude the source image; defaults to false.
plain_tarBooleanWrite an uncompressed tar archive; defaults to false.
sinceStringOptional incremental export boundary; available only on this class method.
last_layersIntegerOptional number of most recent layers to export; available only on this class method.
Returns
nil
No return value.
snapshot.save_to()
Example
Example
Parameters
output_pathStringDestination archive path on the host.
with_parentsBooleanInclude parent snapshots; defaults to false.
with_imageBooleanInclude the source image; defaults to false.
plain_tarBooleanWrite an uncompressed tar archive; defaults to false.
Returns
nil
No return value.
snapshot.digest
Returns
String
Snapshot digest.
snapshot.size_bytes
Returns
Integer | nil
Snapshot size.
snapshot.reference
Returns
String
Backend-specific reference.
snapshot.reference_kind
Returns
String
Kind of reference; preserve it with the value.
SnapshotHandle
handle.digest
Returns
String
Snapshot digest.
handle.size_bytes
Returns
Integer | nil
Snapshot size.
handle.reference
Returns
String
Backend-specific reference.
handle.reference_kind
Returns
String
Kind of reference; preserve it with the value.
handle.name
Returns
String | nil
Snapshot name.
handle.image_ref
Returns
String
Source image reference.
handle.state_kind
Returns
String
Captured state kind.
handle.open()
Returns
Snapshot
Open the snapshot through the retained backend.
handle.remove()
Parameters
forceBooleanWhether to force removal. This positional argument is required.
Returns
nil
No return value.
handle.save_to()
Parameters
output_pathStringDestination archive path on the host.
with_parentsBooleanInclude parent snapshots; defaults to false.
with_imageBooleanInclude the source image; defaults to false.
plain_tarBooleanWrite an uncompressed tar archive; defaults to false.
Returns
nil
No return value.