|
| 1 | +--- |
| 2 | +title: Volume Backup Functionality |
| 3 | +type: Standard |
| 4 | +status: Draft |
| 5 | +track: IaaS |
| 6 | +--- |
| 7 | + |
| 8 | +## Introduction |
| 9 | + |
| 10 | +OpenStack offers a variety of resources where users are able to transfer and store data in the infrastructure. |
| 11 | +A prime example of these resources are volumes which are attached to virtual machines as virtual block storage devices. |
| 12 | +As such they carry potentially large amounts of user data which is constantly changing at runtime. |
| 13 | +It is important for users to have the ability to create backups of this data in a reliable and effifcient manner. |
| 14 | + |
| 15 | +## Terminology |
| 16 | + |
| 17 | +| Term | Meaning | |
| 18 | +|---|---| |
| 19 | +| CSP | Cloud Service Provider, provider managing the OpenStack infrastructure | |
| 20 | +| IaaS | Abbreviation for Infrastructure as a Service | |
| 21 | +| Image | IaaS resource representing a snapshot of a block storage disk, can be used to create Volumes | |
| 22 | +| Volume | IaaS resource representing a virtual block storage device that can be attached as a disk to virtual machines | |
| 23 | + |
| 24 | +## Motivation |
| 25 | + |
| 26 | +The [volume backup functionality of the Block Storage API](https://docs.openstack.org/cinder/latest/admin/volume-backups.html) is a feature that is not available in all clouds per default, e.g., in OpenStack. |
| 27 | +The feature requires a backend to be prepared and configured correctly before it can be used. |
| 28 | +In the Block Storage service, the backup storage backend is usually configured separately from the storage backend of the general volume service and may not be mandatory. |
| 29 | +Thus, an arbitrary cloud may or may not offer the backup feature in the Block Storage API. |
| 30 | + |
| 31 | +This standard aims to make this functionality the default in SCS clouds so that customers can expect the feature to be usable. |
| 32 | + |
| 33 | +## Design Considerations |
| 34 | + |
| 35 | +The standard should make sure that the feature is available and usable but should not limit the exact implementation (e.g. choice of backend driver) any further than necessary. |
| 36 | + |
| 37 | +### Options considered |
| 38 | + |
| 39 | +#### Only recommend volume backup feature, use images as alternative |
| 40 | + |
| 41 | +As an alternative to the volume backup feature of the Block Storage API, images can also be created based on volumes and act as a backup under certain circumstances. |
| 42 | +As an option, this standard could keep the actual integration of the volume backup feature optional and guide users how to use images as backup targets instead in case the feature is unavailable. |
| 43 | + |
| 44 | +However, it is not guaranteed that the image backend storage is separate from the volume storage. |
| 45 | +For instance, both could be using the same Ceph cluster. |
| 46 | +In such case, the images would not count as genuine backups. |
| 47 | + |
| 48 | +Although users are able to download images and transfer them to a different storage location, this approach might also prove unfeasible depending on the image size and the existence (or lack) of appropriate target storage on the user side. |
| 49 | + |
| 50 | +Furthermore, incremental backups are not possible when creating images from volumes either. |
| 51 | +This results in time-consuming backup operations of fully copying a volume everytime a backup is created. |
| 52 | + |
| 53 | +#### Focus on feature availability, make feature mandatory |
| 54 | + |
| 55 | +This option is pretty straightforward. |
| 56 | +It would make the volume backup feature mandatory for SCS clouds. |
| 57 | +This way users can expect the feature to be available and usable. |
| 58 | + |
| 59 | +With this, users can leverage functionalities like incremental backups and benefit from optimized performance of the backup process due to the tight integration with the volume service. |
| 60 | + |
| 61 | +However, it does not seem feasible to also mandate having a separate storage backend for volume backups at the same time due to potential infrastructure limitations at CSP-side making it hard or even impossible to offer. |
| 62 | +As such, the actual benefit of backups in terms of reliability and security aspects would be questionable if a separate storage backend is not mandated and therefore not guaranteed. |
| 63 | + |
| 64 | +This approach would focus on feature availability rather than backup reliability. |
| 65 | + |
| 66 | +#### Focus on backup reliability, make separate backend mandatory |
| 67 | + |
| 68 | +As an alternative, the volume backup feature availability could be made optional but in case a CSP chooses to offer it, the standard would mandate a separate storage backend to be used for volume backups. |
| 69 | +This way, failures of the volume storage backend would not directly impact the availability and safety of volume backups, making them actually live up to their name. |
| 70 | + |
| 71 | +In contrast to the above, this approach would focus on backup reliability rather than feature availability. |
| 72 | + |
| 73 | +## Standard |
| 74 | + |
| 75 | +This standard decides to go with the second option and makes the volume backup feature mandatory in the following way: |
| 76 | + |
| 77 | +In an SCS cloud, the volume backup functionality MUST be configured properly and its API as defined per `/v3/{project_id}/backups` MUST be offered to customers. |
| 78 | +If using Cinder, a suitable [backup driver](https://docs.openstack.org/cinder/latest/configuration/block-storage/backup-drivers.html) MUST be set up. |
| 79 | + |
| 80 | +The volume backup target storage SHOULD be a separate storage system from the one used for volumes themselves. |
| 81 | + |
| 82 | +## Related Documents |
| 83 | + |
| 84 | +- [OpenStack Block Storage v3 Backup API reference](https://docs.openstack.org/api-ref/block-storage/v3/index.html#backups-backups) |
| 85 | +- [OpenStack Volume Backup Drivers](https://docs.openstack.org/cinder/latest/configuration/block-storage/backup-drivers.html) |
| 86 | + |
| 87 | +## Conformance Tests |
| 88 | + |
| 89 | +Conformance tests include using the `/v3/{project_id}/backups` Block Storage API endpoint to create a volume and a backup of it as a non-admin user and subsequently restore the backup on a new volume while verifying the success of each operation. |
| 90 | +These tests verify the mandatory part of the standard: providing the Volume Backup API. |
| 91 | + |
| 92 | +There is a test suite in [`volume-backup-tester.py`](https://github.com/SovereignCloudStack/standards/blob/main/Tests/iaas/volume-backup/volume-backup-tester.py). |
| 93 | +The test suite connects to the OpenStack API and executes basic operations using the volume backup API to verify that the functionality requested by the standard is available. |
| 94 | +Please consult the associated [README.md](https://github.com/SovereignCloudStack/standards/blob/main/Tests/iaas/volume-backup/README.md) for detailed setup and testing instructions. |
| 95 | + |
| 96 | +Note that these tests don't verify the optional part of the standard: providing a separate storage backend for Cinder volume backups. |
| 97 | +This cannot be checked from outside of the infrastructure as it is an architectural property of the infrastructure itself and transparent to customers. |
0 commit comments