Skip to content

Commit 83672ab

Browse files
committed
doc/rgw: Updating doc for cloud-restore feature
Signed-off-by: Soumya Koduri <[email protected]>
1 parent 7861012 commit 83672ab

File tree

3 files changed

+294
-7
lines changed

3 files changed

+294
-7
lines changed

doc/radosgw/cloud-restore.rst

Lines changed: 269 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,269 @@
1+
=============
2+
Cloud Restore
3+
=============
4+
5+
`cloud-transition <https://docs.ceph.com/en/latest/radosgw/cloud-transition>`__ feature enables data transition to a remote cloud service. The ``cloud-restore`` feature enables restoration of those transitioned objects from the remote cloud S3 endpoints into RGW.
6+
7+
This feature currently enables restore of objects that are transitioned to only S3 compatible cloud services. In order to validate this, ``retain_head_object`` option should be set to true in the ``tier-config`` while configuring storage class.
8+
9+
The objects can be restored using `S3 RestoreObject <https://docs.aws.amazon.com/AmazonS3/latest/API/API_RestoreObject.html>`__ API . The restored copies will be retained on RGW only for the duration of ``Days`` specified. However if ``Days`` are not provided, the downloaded copy is considered permanent and will be treated as regular object.
10+
In addition, by enabling ``allow_read_through`` option, `S3 GetObject <https://docs.aws.amazon.com/AmazonS3/latest/API/API_GetObject.html>`__ API can be used as well to restore the object temporarily.
11+
12+
13+
Cloud Storage Class Tier Configuration
14+
--------------------------------------
15+
16+
The `tier configuration <https://docs.ceph.com/en/latest/radosgw/cloud-transition/#cloud-storage-class-configuration>`__ of the cloud storage class configured for data transition is used to restore objects as well.
17+
18+
::
19+
20+
{
21+
"access_key": <access>,
22+
"secret": <secret>,`
23+
"endpoint": <endpoint>,
24+
"region": <region>,
25+
"host_style": <path | virtual>,
26+
"acls": [ { "type": <id | email | uri>,
27+
"source_id": <source_id>,
28+
"dest_id": <dest_id> } ... ],
29+
"target_path": <target_path>,
30+
"target_storage_class": <target-storage-class>,
31+
"multipart_sync_threshold": {object_size},
32+
"multipart_min_part_size": {part_size},
33+
"retain_head_object": <true | false>
34+
}
35+
36+
Additionally, below options have been added to the tier configuration to facilitate object restoration.
37+
38+
* ``restore_storage_class`` (string)
39+
40+
The storage class to which the object data needs to be restored to. Default value is `STANDARD`.
41+
42+
43+
read-through specific Configurables:
44+
~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
45+
46+
* ``allow_read_through`` (true | false)
47+
48+
If true, enables ``read-through``. Objects can then be restored using ``S3 GetObject`` API as well.
49+
50+
* ``read_through_restore_days`` (interger)
51+
52+
The duration for which objects restored via ``read-through`` are retained for. Default value is 1 day.
53+
54+
For example:
55+
56+
::
57+
58+
# radosgw-admin zonegroup placement modify --rgw-zonegroup default \
59+
--placement-id default-placement \
60+
--storage-class CLOUDTIER \
61+
--tier-config=endpoint=http://XX.XX.XX.XX:YY,\
62+
access_key=<access_key>,secret=<secret>, \
63+
retain_head_object=true, \
64+
restore_storage_class=COLDTIER, \
65+
allow_read_through=true, \
66+
read_through_restore_days=10
67+
68+
69+
70+
S3 Glacier specific Configurables:
71+
~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
72+
73+
To restore objects archived in an S3 Glacier or Tape cloud storage, the data must first be restored to the cloud service before being read and downloaded into RGW. To enable this process, ensure the storage class is configured with ``--tier-type=cloud-s3-glacier``. Additionally, the following configurables should be set accordingly:
74+
75+
* ``glacier_restore_days`` (integer)
76+
77+
The duration of the objects to be restored on the remote cloud service.
78+
79+
* ``glacier_restore_tier_type`` (Standard | Expedited)
80+
81+
The type of retrieval of the object archived on the cloud service. Supported options are ``Standard`` and ``Expedited``.
82+
83+
84+
For example:
85+
86+
::
87+
88+
# radosgw-admin zonegroup placement add --rgw-zonegroup=default \
89+
--placement-id=default-placement \
90+
--storage-class=CLOUDTIER-GLACIER --tier-type=cloud-s3-glacier
91+
92+
# radosgw-admin zonegroup placement modify --rgw-zonegroup default \
93+
--placement-id default-placement \
94+
--storage-class CLOUDTIER \
95+
--tier-config=endpoint=http://XX.XX.XX.XX:YY,\
96+
access_key=XXXXX,secret=YYYYY, \
97+
retain_head_object=true, \
98+
target_storage_class=Glacier, \
99+
............
100+
............
101+
restore_storage_class=COLDTIER, \
102+
glacier_restore_days=2, \
103+
glacier_restore_tier_type=Expedited
104+
105+
106+
[
107+
{
108+
"key": "default-placement",
109+
"val": {
110+
"name": "default-placement",
111+
"tags": [],
112+
"storage_classes": [
113+
"CLOUDTIER-GLACIER",
114+
"STANDARD"
115+
],
116+
"tier_targets": [
117+
{
118+
"key": "CLOUDTIER-GLACIER",
119+
"val": {
120+
"tier_type": "cloud-s3-glacier",
121+
"storage_class": "CLOUDTIER-GLACIER",
122+
"retain_head_object": "true",
123+
"s3": {
124+
"endpoint": http://XX.XX.XX.XX:YY,
125+
"access_key": "XXXXX",
126+
"secret": "YYYYY",
127+
"host_style": "path",
128+
"target_storage_class": "Glacier",
129+
.......
130+
.......
131+
}
132+
"allow_read_through": true,
133+
"read_through_restore_days": 10,
134+
"restore_storage_class": "COLDTIER",
135+
"s3-glacier": {
136+
"glacier_restore_days": 2
137+
"glacier_restore_tier_type": "Expedited"
138+
}
139+
}
140+
}
141+
]
142+
}
143+
}
144+
]
145+
146+
147+
148+
Examples to Restore Object:
149+
---------------------------
150+
151+
Using S3 RestoreObject CLI
152+
~~~~~~~~~~~~~~~~~~~~~~~~~
153+
154+
Below options of `S3 restore-object <https://docs.aws.amazon.com/cli/latest/reference/s3api/restore-object.html>`__ CLI are supported -
155+
156+
157+
Syntax
158+
159+
::
160+
161+
162+
$ aws s3api restore-object
163+
--bucket <value>
164+
--key <value>
165+
[--version-id <value>]
166+
--restore-request (structure) {
167+
Days=<integer>
168+
}
169+
170+
Note: ``Days`` is optional and if not provided, the object is restored permanently
171+
172+
Example 1:
173+
174+
::
175+
176+
$ aws s3api restore-object --bucket bucket1 --key doc1.rtf
177+
[--version-id 3sL4kqtJlcpXroDTDmJ+rmSpXd3dIbrHY+MTRCxf3vjVBH40Nr8X8gdRQBpUMLUo]
178+
--restore-request Days=10
179+
....
180+
181+
This will restore the object `doc1.rtf` of the given version for the duration of 10 days.
182+
183+
184+
185+
Example 2:
186+
187+
::
188+
189+
$ aws s3api restore-object --bucket bucket1 --key doc2.rtf --restore-request {} ....
190+
191+
This will restore the object `doc2.rtf` permanently and will be treated as regular object.
192+
193+
194+
195+
Using S3 GetObject CLI
196+
~~~~~~~~~~~~~~~~~~~~~
197+
Ensure ``allow_read_through`` tier-config option is enabled.
198+
199+
Example 3:
200+
201+
::
202+
203+
$ aws s3api get-object --bucket bucket1 --key doc3.rtf ....
204+
205+
This will restore the object `doc3.rtf` for the duration of the ``read_through_restore_days`` configured.
206+
207+
208+
Note: The above CLI command may time out if the object restoration takes too long. Before reissuing the command, you can verify the restoration status.
209+
210+
211+
Verifying the restore status
212+
----------------------------
213+
Verify the status of the restore by running an `S3 HeadObject <https://docs.aws.amazon.com/AmazonS3/latest/API/API_HeadObject.html#API_HeadObject_ResponseSyntax>`__ request. The response includes ``x-amz-restore`` header if either the object restoration is in progress or a copy of it is already restored.
214+
215+
Example,
216+
217+
::
218+
219+
$ aws s3api head-object --key doc1.rtf --bucket bucket1 ....
220+
221+
222+
In addition, ``radosgw-admin`` CLI can be used to check the restoration status and other details on the RGW server.
223+
224+
Example,
225+
226+
::
227+
228+
$ radosgw-admin object stat --bucket bucket1 --object doc1.rtf
229+
230+
231+
Restored Object Properties
232+
--------------------------
233+
234+
235+
Storage
236+
~~~~~~
237+
The objects are restored to the storage class configured for ``restore_storage_class`` tier-config option. However, as per `AWS S3 RestoreObject <https://docs.aws.amazon.com/cli/latest/reference/s3api/restore-object.html>`__ the storage class of restored objects should remain unchanged. Therefore, for temporary copies, the x-amz-storage-class will continue to reflect the original cloud-tier storage class.
238+
239+
240+
mtime
241+
~~~~
242+
The `mtime` of the transitioned and restored objects should remain unchanged.
243+
244+
245+
Lifecycle
246+
~~~~~~~~
247+
`Temporary` copies are not subjected to any further transition to the cloud. However (as is the case with `cloud-transitioned objects`) they can be deleted via regular LC expiration rules or via external S3 Delete request.
248+
`Permanent` copies are treated as any regular objects and are subjected to any LC rules applicable.
249+
250+
251+
Replication
252+
~~~~~~~~~~
253+
`Temporary` copies are not replicated and will be retained only on the zones the restore request is initiated on.
254+
`Permanent` copies are replicated like other regular objects.
255+
256+
257+
Versioned Objects
258+
~~~~~~~~~~~~~~~~
259+
For versioned objects, if an object has been `cloud-transitioned`, it would be in a non-current state. After a restore, the same non-current object will be updated with the downloaded data, and its HEAD object will be modified accordingly.
260+
261+
262+
263+
Future Work
264+
-----------
265+
266+
* Admin Ops
267+
268+
* Notifications
269+

doc/radosgw/cloud-transition.rst

Lines changed: 24 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -4,14 +4,27 @@ Cloud Transition
44

55
This feature enables data transition to a remote cloud service as part of `Lifecycle Configuration <https://docs.aws.amazon.com/AmazonS3/latest/dev/object-lifecycle-mgmt.html>`__ via :ref:`storage_classes`. The transition is unidirectional; data cannot be transitioned back from the remote zone. The goal of this feature is to enable data transition to multiple cloud providers. The currently supported cloud providers are those that are compatible with AWS (S3).
66

7-
Special storage class of tier type ``cloud-s3`` is used to configure the remote cloud S3 object store service to which the data needs to be transitioned. These are defined in terms of zonegroup placement targets and unlike regular storage classes, do not need a data pool.
7+
Special storage class of tier type ``cloud-s3`` or ``cloud-s3-glacier`` is used to configure the remote cloud S3 object store service to which the data needs to be transitioned. These are defined in terms of zonegroup placement targets and unlike regular storage classes, do not need a data pool.
88

99
User credentials for the remote cloud object store service need to be configured. Note that source ACLs will not
1010
be preserved. It is possible to map permissions of specific source users to specific destination users.
1111

1212

13-
Cloud Storage Class Configuration
14-
---------------------------------
13+
Cloud Storage Class Tier Type
14+
-----------------------------
15+
16+
* ``tier-type`` (string)
17+
18+
The type of remote cloud service that will be used to transition objects. Below tier types are supported:
19+
20+
* ``cloud-s3`` : S3 compatible object store service
21+
22+
* ``cloud-s3-glacier`` : S3 Glacier or Tape storage services where in objects are archived
23+
24+
25+
26+
Cloud Storage Class Tier Configuration
27+
--------------------------------------
1528

1629
::
1730

@@ -120,7 +133,7 @@ Minimum parts size to use when transitioning objects using multipart upload.
120133
How to Configure
121134
~~~~~~~~~~~~~~~~
122135

123-
See :ref:`adding_a_storage_class` for how to configure storage-class for a zonegroup. The cloud transition requires a creation of a special storage class with tier type defined as ``cloud-s3``
136+
See :ref:`adding_a_storage_class` for how to configure storage-class for a zonegroup. The cloud transition requires a creation of a special storage class with tier type defined as ``cloud-s3`` or ``cloud-s3-glacier``
124137

125138
.. note:: If you have not done any previous `Multisite Configuration`_,
126139
a ``default`` zone and zonegroup are created for you, and changes
@@ -179,7 +192,7 @@ For example:
179192
]
180193

181194

182-
.. note:: Once a storage class is created of ``--tier-type=cloud-s3``, it cannot be later modified to any other storage class type.
195+
.. note:: Once a storage class is created of ``--tier-type=cloud-s3`` or ``--tier-type=cloud-s3-glacier`` , it cannot be later modified to any other storage class type.
183196

184197
The tier configuration can be then done using the following command
185198

@@ -354,15 +367,19 @@ For versioned and locked objects, similar semantics as that of LifecycleExpirati
354367
* If the object is noncurrent and is locked, its transition is skipped.
355368

356369

370+
Restoring Objects
371+
-----------------
372+
The objects transitioned to cloud can now be restored. For more information, refer to
373+
`Restoring Objects from Cloud <https://docs.aws.amazon.com/AmazonS3/latest/dev/cloud-restore.html>`
374+
375+
357376
Future Work
358377
-----------
359378

360379
* Send presigned redirect or read-through the objects transitioned to cloud
361380

362381
* Support s3:RestoreObject operation on cloud transitioned objects.
363382

364-
* Federation between RGW and Cloud services.
365-
366383
* Support transition to other cloud providers (like Azure).
367384

368385
.. _`Multisite Configuration`: ../multisite

doc/radosgw/index.rst

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -87,6 +87,7 @@ Cluster with one API and then retrieve that data with the other API.
8787
Lua Scripting <lua-scripting>
8888
D3N Data Cache <d3n_datacache>
8989
Cloud Transition <cloud-transition>
90+
Cloud Restore <cloud-restore>
9091
Metrics <metrics>
9192
UADK Acceleration for Compression <uadk-accel>
9293
Bucket Logging <bucket_logging>

0 commit comments

Comments
 (0)