[cinder] revert volume to snapshot
Hi, There is a restful api[1] to revert volume to snapshot. But the description means we can only use this api to revert volume to its latest snapshot. Are some drivers limited to rolling back only to the latest snapshot? Or just nobody helps to improve the api to revert volume to any snapshots of the volume? [1] https://docs.openstack.org/api-ref/block-storage/v3/index.html?expanded=reve... Thanks, Boxiang
There is a restful api[1] to revert volume to snapshot. But the description means we can only use this api to revert volume to its latest snapshot.
Are some drivers limited to rolling back only to the latest snapshot? Or just nobody helps to improve the api to revert volume to any snapshots of the volume?
This is partly due to the rollback abilities of each type of storage. Some types can't revert to several snapshots back without losing the more recent snapshots. This means that Cinder would still think there are snapshots available, but those snapshots would no longer be present on the storage device. This is considered a data loss condition, so we need to protect against that from happening. It's been discussed several times at Design Summits and PTGs, and at least so far there has not been a good way to handle it. The best recommendation we can give is for anyone that needs to go back several snapshots, you will need to revert one snapshot at a time to get back to where you need to be. But it is also worth pointing out that snapshots, and the ability to revert to snapshots, is not necessarily the best mechanism for data protection. If you need to have the ability to restore a volume back to its earlier state, using the backup/restore APIs are likely the more appropriate way to go. Sean
Thank you, Sean. At 2021-06-15 18:54:00, "Sean McGinnis" <sean.mcginnis@gmx.com> wrote:
This is partly due to the rollback abilities of each type of storage. Some types can't revert to several snapshots back without losing the more recent
snapshots. This means that Cinder would still think there are snapshots
BTW, do we have counted which drivers can't / can revert to several snapshots back without losing the more recent snapshots?
available, but those snapshots would no longer be present on the storage
device.
This is considered a data loss condition, so we need to protect against that from happening. It's been discussed several times at Design Summits and PTGs, and at least so far there has not been a good way to handle it.
The best recommendation we can give is for anyone that needs to go back several snapshots, you will need to revert one snapshot at a time to get back to where you need to be.
But it is also worth pointing out that snapshots, and the ability to revert to snapshots, is not necessarily the best mechanism for data protection. If you need to have the ability to restore a volume back to its earlier state, using the backup/restore APIs are likely the more appropriate way to go.
Sean
On 15/06, Boxiang Zhu wrote:
Hi,
There is a restful api[1] to revert volume to snapshot. But the description means we can only use this api to revert volume to its latest snapshot.
Are some drivers limited to rolling back only to the latest snapshot? Or just nobody helps to improve the api to revert volume to any snapshots of the volume?
[1] https://docs.openstack.org/api-ref/block-storage/v3/index.html?expanded=reve...
Thanks, Boxiang
Hi, There's a spec proposal [1] under review to improve the revert to snapshot so it can work with all drivers regardless of their limitations. The spec was briefly discussed during the Xena PTG [2]. Cheers, Gorka. [1]: https://review.opendev.org/c/openstack/cinder-specs/+/736111 [2]: https://wiki.openstack.org/wiki/CinderXenaPTGSummary#Support_revert_any_snap...
participants (3)
-
Boxiang Zhu
-
Gorka Eguileor
-
Sean McGinnis