Snapshots
shard snapshot
Section titled “shard snapshot”Save and manage filesystem snapshots.
shard snapshot COMMAND [OPTIONS] [ARGS...]Commands
| Command | Description |
|---|---|
shard snapshot create |
save a stopped sandbox’s files as a snapshot |
shard snapshot list |
list snapshots |
shard snapshot inspect |
show detailed information about a snapshot |
shard snapshot remove |
delete a snapshot and its files |
shard snapshot create
Section titled “shard snapshot create”Save a stopped sandbox’s files as a snapshot and print its ID.
shard snapshot create [OPTIONS] SANDBOXExamples
shard stop webshard snapshot create --name web-base webArguments
| Argument | Description |
|---|---|
SANDBOX |
source sandbox ID or name |
Options
| Option | Description |
|---|---|
--name <name> |
snapshot name to use instead of its ID |
Stop the sandbox first. Snapshots contain files, not memory or process state. They remain available after the source sandbox is removed.
shard snapshot list
Section titled “shard snapshot list”List filesystem snapshots.
shard snapshot list [OPTIONS]Examples
shard snapshot listshard snapshot list --format jsonOptions
| Option | Description | Default |
|---|---|---|
--format <format> |
output format: json or table | table |
Table columns: ID, NAME, SOURCE, IMAGE, SIZE and CREATED.
shard snapshot inspect
Section titled “shard snapshot inspect”Show detailed information about a snapshot.
shard snapshot inspect [OPTIONS] SNAPSHOTExamples
shard snapshot inspect web-baseshard snapshot inspect --format table web-baseArguments
| Argument | Description |
|---|---|
SNAPSHOT |
snapshot ID or name |
Options
| Option | Description | Default |
|---|---|---|
--format <format> |
output format: json or table | json |
shard snapshot remove
Section titled “shard snapshot remove”Delete a snapshot and its files.
shard snapshot remove SNAPSHOTExample
shard snapshot remove web-baseArguments
| Argument | Description |
|---|---|
SNAPSHOT |
snapshot ID or name |
Sandboxes created from the snapshot keep their own files.
Create a sandbox from a snapshot
Section titled “Create a sandbox from a snapshot”shard stop webshard snapshot create --name web-base webshard create --name web-2 --snapshot web-baseA snapshot holds the files of a stopped sandbox, with no memory image. No two snapshots share a name, and a snapshot outlives its source.
shard create --snapshot takes no image and never pulls:
- The image must be on the host at the digest the snapshot recorded. If the host no longer holds it, or holds it at another digest, shard refuses the create, and the error says what to do.
- Only a server that runs the provider that made the snapshot can create from it.
- With no
--memoryor--disk, the new sandbox takes the memory and disk bounds its source ran under. - On Firecracker and vz, a larger
--diskgrows the snapshot’s disk and its filesystem. shard refuses a smaller one, because a disk can only grow. - On the other providers, shard refuses a
--diskthat is too small for the snapshot’s files.
JSON output shows the record that shard snapshot inspect prints.