You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Copy file name to clipboardExpand all lines: modules/manage/pages/mountable-topics.adoc
+2Lines changed: 2 additions & 0 deletions
Display the source diff
Display the rich diff
Original file line number
Diff line number
Diff line change
@@ -4,4 +4,6 @@
4
4
:page-categories: Management
5
5
:env-linux: true
6
6
7
+
For topics with Tiered Storage enabled, you can unmount a topic to safely detach it from a cluster and keep the topic data in the cluster's object storage bucket or container. You can mount the detached topic to either the same origin cluster, or a different one. This allows you to hibernate a topic and free up system resources taken up by the topic, or migrate a topic to a different cluster.
For topics with Tiered Storage enabled, you can unmount a topic to safely detach it from a cluster and keep the topic data in the cluster's object storage bucket or container. You can mount the detached topic to either the same origin cluster, or a different one. This allows you to hibernate a topic and free up system resources taken up by the topic, or migrate a topic to a different cluster.
2
-
3
1
== Prerequisites
4
2
5
3
[NOTE]
6
4
====
7
5
include::shared:partial$enterprise-license.adoc[]
8
6
====
9
7
8
+
ifndef::env-cloud[]
10
9
. xref:get-started:rpk-install.adoc[Install `rpk`], or ensure that you have access to the Admin API.
11
10
. Enable xref:manage:tiered-storage.adoc[Tiered Storage] for specific topics, or for the entire cluster (all topics).
11
+
endif::[]
12
+
ifdef::env-cloud[]
13
+
. xref:manage:rpk/rpk-install.adoc[Install `rpk`] to run cluster mount and unmount operations on the command line, or xref:manage:api/cloud-api-authentication.adoc[authenticate] to the Cloud API and execute these operations programmatically.
14
+
+
15
+
If using the Cloud API, you'll make requests against Data Plane APIs. Make sure you xref:manage:api/cloud-dataplane-api.adoc#get-data-plane-api-url[retrieve the Data Plane API URL] and use this URL to perform a mount or unmount operation.
16
+
. Enable xref:ROOT:manage:tiered-storage.adoc[Tiered Storage] for the topics you want to unmount or mount.
17
+
endif::[]
18
+
12
19
13
20
== Unmount a topic from a cluster to object storage
14
21
@@ -32,6 +39,7 @@ In your cluster, run this command to unmount a topic to object storage:
@@ -55,9 +63,27 @@ curl -X POST http://localhost:9644/v1/topics/unmount -d {
55
63
56
64
You may optionally include the topic namespace (`ns`). Only `kafka` is supported.
57
65
--
66
+
endif::[]
67
+
ifdef::env-cloud[]
68
+
Cloud API::
69
+
+
70
+
--
71
+
To unmount topics from a cluster using the Cloud API, issue a POST request to the `/v1alpha2/cloud-storage/unmount` endpoint. Specify the names of the desired topics in the request body:
72
+
73
+
[,bash]
74
+
----
75
+
curl -X POST "<dataplane-api-url>/v1alpha2/cloud-storage/topics/unmount" \
76
+
-H "Authorization: Bearer <token>" \
77
+
-H "accept: application/json" \
78
+
-H "content-type: application/json" \
79
+
-d '{"topics":"<topic-name>"}'
80
+
----
81
+
82
+
--
83
+
endif::[]
58
84
======
59
85
60
-
You can use the ID returned by the command to <<monitor-progress,monitor the progress>> of the unmount operation using `rpk` or the Admin API.
86
+
You can use the ID returned by the command to <<monitor-progress,monitor the progress>> of the unmount operation using `rpk` or the API.
You only use the new name for the topic in the target cluster. This name does not persist if you unmount this topic again. Redpanda keeps the original name in object storage if you remount the topic later.
* `ns` is the topic namespace. This field is optional and only `kafka` is supported.
173
+
* You may have multiple topics with the same name that are available to mount from object storage. This can happen if you have unmounted topics using the same name in different clusters. To uniquely identify a source topic, use `<topic-name>/<cluster-uuid>/<initial-revision>` as the topic reference.
174
+
* To rename a topic in the target cluster, use the optional `alias` object in the request body. The following example shows how to specify a new name for topic 1 in the target cluster, while topic 2 retains its original name in the target cluster.
175
+
176
+
--
177
+
endif::[]
178
+
ifdef::env-cloud[]
179
+
Cloud API::
180
+
+
181
+
--
182
+
. List the topics that are available to mount from object storage by making a GET request to the `/v1alpha2/cloud-storage/topics/mountable` endpoint.
The `topic_location` is the unique topic location in object storage, in the format `<topic-name>/<cluster-uuid>/<initial-revision>`. Redpanda assigns the number `initial-revision` to a topic upon creation. You can use `topic-location` as the topic reference instead of just the topic name to identify a unique topic to mount in the next step.
205
+
206
+
. To mount topics to a target cluster using the Cloud API, make a POST request to the `/cloud-storage/topics/mount` endpoint. Specify the names of the topics in the request body:
207
+
+
208
+
```
209
+
curl -X POST "<dataplane-api-url>/v1alpha2/cloud-storage/topics/mount" -d {
* `ns` is the topic namespace. This field is optional and only `kafka` is supported.
150
222
* You may have multiple topics with the same name that are available to mount from object storage. This can happen if you have unmounted topics with this name from different clusters. To uniquely identify a source topic, use `<topic-name>/<cluster-uuid>/<initial-revision>` as the topic reference.
151
-
* To rename a topic in the target cluster, use the optional `alias` object in the request body. In the example, you specify new names for topics 1 and 3 in the target cluster, but topic 2 retains its original name in the target cluster.
223
+
* To rename a topic in the target cluster, use the optional `alias` object in the request body. The following example shows how to specify a new name for topic 1 in the target cluster, while topic 2 retains its original name in the target cluster.
152
224
153
225
--
226
+
endif::[]
154
227
155
228
======
156
229
157
-
You can use the ID returned by the operation to <<monitor-progress,monitor its progress>> using `rpk` or the Admin API.
230
+
You can use the ID returned by the operation to <<monitor-progress,monitor its progress>> using `rpk` or the API.
158
231
159
232
When the mount operation is complete, the target cluster handles produce and consume workloads for the topics.
`<migration-id>` is the unique identifier of the operation. Redpanda returns this ID when you start a mount or unmount. You can also retrieve the ID by listing <<monitor-progress,existing operations>>.
0 commit comments