.. _Managing Volume Snapshots: Managing Volume Snapshots ------------------------- .. _vinfra service compute volume snapshot create: vinfra service compute volume snapshot create ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ Create a snapshot of a volume: :: usage: vinfra service compute volume snapshot create [--description ] --volume ``--description `` Volume snapshot description ``--volume `` Volume ID or name ```` Volume snapshot name Example: :: # vinfra service compute volume snapshot create mysnapshot --volume myvolume +-------------+--------------------------------------+ | Field | Value | +-------------+--------------------------------------+ | created_at | 2019-04-30T13:12:54.297629+00:00 | | description | | | id | 3fdfe5d6-8bd2-4bf5-8599-a9cef50e5b71 | | metadata | {} | | name | mysnapshot | | project_id | fd0ae61496d04ef6bb637bc3167b7eaf | | size | 8 | | status | creating | | volume_id | 92dc3bd7-713d-42bf-83cd-4de40c24fed9 | +-------------+--------------------------------------+ This command initiates creation of a snapshot ``mysnapshot`` of the volume ``myvolume``. .. _vinfra service compute volume snapshot list: vinfra service compute volume snapshot list ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ List volume snapshots: :: usage: vinfra service compute volume snapshot list Example: :: # vinfra service compute volume snapshot list -c id -c name -c size -c status +--------------------------------------+------------+-----------+ | id | name | status | +--------------------------------------+------------+-----------+ | 3fdfe5d6-8bd2-4bf5-8599-a9cef50e5b71 | mysnapshot | available | +--------------------------------------+------------+-----------+ This command lists volume snapshots available to the compute cluster. (The output is abridged to fit on page.) .. _vinfra service compute volume snapshot show: vinfra service compute volume snapshot show ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ Display details of a volume snapshot: :: usage: vinfra service compute volume snapshot show ```` Volume snapshot ID or name Example: :: # vinfra service compute volume snapshot show mysnapshot +-------------+--------------------------------------+ | Field | Value | +-------------+--------------------------------------+ | created_at | 2019-04-30T13:12:54.297629+00:00 | | description | | | id | 3fdfe5d6-8bd2-4bf5-8599-a9cef50e5b71 | | metadata | {} | | name | mysnapshot | | project_id | fd0ae61496d04ef6bb637bc3167b7eaf | | size | 8 | | status | available | | volume_id | 92dc3bd7-713d-42bf-83cd-4de40c24fed9 | +-------------+--------------------------------------+ This command shows the details for the volume snapshot ``mysnapshot``. .. _vinfra service compute volume snapshot set: vinfra service compute volume snapshot set ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ Modify volume snapshot parameters: :: usage: vinfra service compute volume snapshot set [--description ] [--name ] ``--description `` Volume snapshot description ``--name `` A new name for the volume snapshot ```` Volume snapshot ID or name Example: :: # vinfra service compute volume snapshot set mysnapshot --name mynewsnapshot +-------------+--------------------------------------+ | Field | Value | +-------------+--------------------------------------+ | created_at | 2019-04-30T13:12:54.297629+00:00 | | description | | | id | 3fdfe5d6-8bd2-4bf5-8599-a9cef50e5b71 | | metadata | {} | | name | mynewsnapshot | | project_id | fd0ae61496d04ef6bb637bc3167b7eaf | | size | 8 | | status | available | | volume_id | 92dc3bd7-713d-42bf-83cd-4de40c24fed9 | +-------------+--------------------------------------+ This command changes the name of the volume snapshot ``mysnapshot`` to ``mynewsnapshot``. .. _vinfra service compute volume snapshot upload-to-image: vinfra service compute volume snapshot upload-to-image ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ Create a compute image from a compute volume snapshot: :: usage: vinfra service compute volume snapshot upload-to-image [--name ] ``--name `` Image name ```` Volume snapshot ID or name Example: :: # vinfra service compute volume snapshot upload-to-image --name myvm-image \ mynewsnapshot +------------------+--------------------------------------+ | Field | Value | +------------------+--------------------------------------+ | checksum | | | container_format | bare | | created_at | | | disk_format | qcow2 | | id | 6a7a78c1-7168-4387-9b55-23fd477fdaa0 | | min_disk | | | min_ram | | | name | myvm-image | | os_distro | linux | | os_type | linux | | project_id | | | protected | False | | public | False | | size | 1 | | status | uploading | | tags | | | updated_at | 2019-06-07T12:30:43.462707 | | virtual_size | | +------------------+--------------------------------------+ This command creates the compute image ``myvm-image`` from the volume snapshot ``mynewsnapshot``. .. _vinfra service compute volume snapshot revert: vinfra service compute volume snapshot revert ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ Revert a volume to the specified snapshot: :: usage: vinfra service compute volume snapshot revert ```` Volume snapshot ID or name Example: :: # vinfra service compute volume snapshot revert mynewsnapshot +-------------+--------------------------------------+ | Field | Value | +-------------+--------------------------------------+ | created_at | 2019-04-30T13:12:54.297629+00:00 | | description | | | id | 3fdfe5d6-8bd2-4bf5-8599-a9cef50e5b71 | | metadata | {} | | name | mynewsnapshot | | project_id | fd0ae61496d04ef6bb637bc3167b7eaf | | size | 8 | | status | available | | volume_id | 92dc3bd7-713d-42bf-83cd-4de40c24fed9 | +-------------+--------------------------------------+ This command reverts the volume to its snapshot ``mynewsnapshot``. .. _vinfra service compute volume snapshot reset-state: vinfra service compute volume snapshot reset-state ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ Reset a volume snapshot stuck in the "Error" state or one of transitional states to the "Available" state: :: usage: vinfra service compute volume snapshot reset-state ```` Volume snapshot ID or name Example: :: # vinfra service compute volume snapshot reset-state mynewsnapshot +-------------+--------------------------------------+ | Field | Value | +-------------+--------------------------------------+ | created_at | 2019-04-30T13:12:54.297629+00:00 | | description | | | id | 3fdfe5d6-8bd2-4bf5-8599-a9cef50e5b71 | | metadata | {} | | name | mynewsnapshot | | project_id | fd0ae61496d04ef6bb637bc3167b7eaf | | size | 8 | | status | available | | volume_id | 92dc3bd7-713d-42bf-83cd-4de40c24fed9 | +-------------+--------------------------------------+ This command resets the state of the volume snapshot ``mynewsnapshot``. .. _vinfra service compute volume snapshot delete: vinfra service compute volume snapshot delete ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ Delete a volume snapshot: :: usage: vinfra service compute volume snapshot delete ```` Volume snapshot ID or name Example: :: # vinfra service compute volume snapshot delete mynewsnapshot Operation successful This command deletes the volume snapshot ``mynewsnapshot``.