lbcli list snapshots (2.2 and above)

AI Tools

Lists snapshot resources.

Synopsis

Lists snapshot resources.

lbcli list snapshots [flags]

Examples:

# List all snapshots belonging to project ‘my proj: lbcli -J $JWT --project-name=my-proj list snapshots # Filter a specific snapshot by its snapshot UUID. lbcli -J $JWT list snapshots --project-name=proj-1 --uuid=e08d9ce8-366b-49d6-9fc0-9173b9de29af # Filter a specific snapshot by its name. lbcli -J $JWT list snapshots --project-name=proj-1 --name=snapshot_name # List snapshots by pagination. lbcli -J $JWT list snapshots --project-name=proj-1 --offset-uuid=abcdef00-366b-49d6-9fc0-9173b9de29af --limit=5

Flag

Short

Type

Default

Description

--help

-h

bool


Help for list snapshots.

--name


string


Snapshot name.

--project-name


string


Project name.

--UUID


string


Snapshot UUID.

--limit


int64


Limits the number of snapshots in the response (optional).

--offset-UUID


string


When provided, the returned list starts with next to offset-UUID snapshot (optional).

--show-all


bool


Optional. Shows all snapshots. The default is to show only active snapshots. To return all snapshots including snapshots in deleting state, this should be set to true.

This command returns the following fields for each snapshot. The default output format is human-readable. The human-readable output only shows some of these fields. The json/yaml output format is also supported and includes additional fields.

Field

Type

Description

State

string

The current volume state:

  • Creating

  • Available

  • Deleting

  • Deleted

  • Failed

Name

string

Snapshot name

Description

string

Snapshot description

Creation Time

string

Snapshot creation time

Retention Time

duration

Snapshot retention time. when this time expires the snapshot will be deleted. Setting this value to nil will retain the snapshot until it is explicitly deleted.

Source Volume UUID

string

The source volume UUID which the snapshot was taken from

Source Volume Name

string

The source volume name which the snapshot was taken from.

Replica Count

int

Total replicas count.

Node List

list of strings

Node UUIDs on which the snapshot is stored (only in json/yaml).

Compression

bool

  • False: Compression disabled

  • True: Compression enabled

ACL

list of strings

Access Control List of source volume.

NSID

int

Source volume NSID.

Size

int

Maximal logical capacity of the snapshot in bytes.

Sector Size

int

The snapshot sector size:

  • 0 (default = 4096)

  • 512

  • 4096

Etag

string

An identifier for a specific version of a resource.

Statistics

struct

See the snapshot statistics table.

The table below illustrates the snapshot metrics. Snapshot metrics are similar to volumes and reuse some of the metrics, but do not have the metrics that represent the device size view/totals summed over all the list of snapshots that belong to a volume.

Note that when deleting a snapshot, due to the fact that some of the data in the volume may have already been invalidated, some information is moved over to the layer above (a newer snapshot or volume) - and the capacity that is released when deleting is the only one no longer required (in the use case example below, this means that the data range 0-2 is copied to the volume layer). The only amount of storage that is actually freed up is 0.5G for the range of addresses 2-3G that has since been overwritten - so data is no longer important.

Use Case Example

When a user creates a volume of size 10G:

  • Compression is enabled (assume that data is written which is compressed at 50%).

  • Writes data from address 0-3G.

  • Creates a snapshot.

  • Writes an additional 2G of data to ranges 2-4. This means that 1G was overwritten or deleted and 1G was new.

So overall at the device level:

  • The user has written a total of 5G of bytes to this volume over time (3G + 2G).

  • The current amount of data the user sees on the device associated with this volume is 4G (0-4G address range).

  • The total amount of storage space for the volume and snapshot is 2.5G (0.53G + 0.52G).

Note

All snapshot metrics below represent values for a single replica of the snapshot.

Field

Type

Description

Physical Capacity

uint64

The physical capacity that exists in this snapshot layer.

Physical Owned Capacity

uint64

The capacity that would be freed when the snapshot is deleted. This backs the address range that has not been overwritten since the time of snapshot reaction.

Physical Owned Memory

uint64

The amount of memory that would be freed by deleting this snapshot. This backs the address range that has not been overwritten since the time of snapshot reaction.

Physical Memory

uint64

The amount of memory being used by this snapshot.

User Written

uint64

The amount of bytes written to this snapshot layer.