acceleration
Lists the acceleration snapshots of a dataset loaded by the Spice runtime, shows one snapshot, and sets the current snapshot to roll a dataset back.
Enterprise edition
Acceleration Snapshots are available in the Spice Enterprise edition.
Usage​
spice acceleration snapshots <dataset> [flags]
spice acceleration snapshot <dataset> <snapshot_id> [flags]
spice acceleration set-snapshot <dataset> <snapshot_id> [flags]
Commands​
snapshotsList the snapshots of a dataset, most recent first. CallsGET /v1/datasets/{name}/acceleration/snapshots.snapshotShow one snapshot: its timestamp, location, engine, size, row count, checksum, and whether it is the current snapshot. CallsGET /v1/datasets/{name}/acceleration/snapshots/{snapshot_id}.set-snapshotMake a snapshot the dataset's current snapshot in the snapshot metadata, for rollback. CallsPOST /v1/datasets/{name}/acceleration/snapshots/current. It does not change the data the dataset serves: the runtime answersCurrent snapshot for dataset <name> set to <id>. Restart the runtime to bootstrap from this snapshot.A restart bootstraps from a snapshot only when the dataset's local acceleration file is missing, as How it works describes, so a restart that finds the existing file keeps serving it. An instance that reads the snapshots withrefresh_mode: snapshotdoes not load an older snapshot by polling. Runset-snapshotagainst the instance that publishes the dataset's snapshots: an instance that only reads them answers400 Bad Request, as HTTP API behavior describes.
Flags​
--limit <n>Forsnapshots: the maximum number of snapshots to list. Default:10.-o,--output <format>Output format:table(default) orjson.-h,--helpPrint this help message.
The commands call the runtime's HTTP endpoint (--http-endpoint, default http://127.0.0.1:8090). spice acceleration does not support --cloud.
Examples​
# List the 10 most recent snapshots of taxi_trips
spice acceleration snapshots taxi_trips
# Show snapshot 3
spice acceleration snapshot taxi_trips 3
# Record snapshot 2 as the current snapshot for the next bootstrap
spice acceleration set-snapshot taxi_trips 2
A snapshot that the 28-day snapshot retention dropped is no longer listed, and set-snapshot cannot make it current.
