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
[DOCS] Add docs for restoring to new cluster (#79683) (#79875)
When restoring a snapshot to a new cluster, users may expect the cluster
to not contain any conflicting indices or data streams. However, some
features, such as the GeoIP processor, automatically create indices at
startup.
This adds and updates related procedures in the restore a snapshot tutorial.
I plan to improve other documentation related to feature states in snapshots
in a separate PR(s).
This PR also updates the restore snapshot API's example to include
the `indices` and `feature_states` parameters.
Relates to #79675
In some cases, you need to restore an entire cluster from a snapshot, including
213
-
the cluster state and all system indices. These cases should be rare, such as in
291
+
the cluster state and all feature states. These cases should be rare, such as in
214
292
the event of a catastrophic failure.
215
293
216
-
Restoring an entire cluster involves deleting important system indices, including
217
-
those used for authentication. Consider whether you can restore specific indices
218
-
or data streams instead.
294
+
Restoring an entire cluster involves deleting important system indices,
295
+
including those used for authentication. Consider whether you can restore
296
+
specific indices or data streams instead.
219
297
220
298
If you're restoring to a different cluster, see <<restore-different-cluster>>
221
299
before you start.
@@ -235,6 +313,18 @@ the cluster.
235
313
. Temporarily stop indexing and turn off the following features:
236
314
+
237
315
--
316
+
* GeoIP database downloader
317
+
+
318
+
[source,console]
319
+
----
320
+
PUT _cluster/settings
321
+
{
322
+
"persistent": {
323
+
"ingest.geoip.downloader.enabled": false
324
+
}
325
+
}
326
+
----
327
+
238
328
* ILM
239
329
+
240
330
[source,console]
@@ -265,19 +355,18 @@ POST _ml/set_upgrade_mode?enabled=false
265
355
// TEST[continued]
266
356
////
267
357
268
-
////
358
+
* Monitoring
359
+
+
269
360
[source,console]
270
361
----
271
362
PUT _cluster/settings
272
363
{
273
364
"persistent": {
274
-
"xpack.monitoring.collection.enabled": true
365
+
"xpack.monitoring.collection.enabled": false
275
366
}
276
367
}
277
368
----
278
369
// TEST[warning:[xpack.monitoring.collection.enabled] setting was deprecated in Elasticsearch and will be removed in a future release! See the breaking changes documentation for the next major version.]
279
-
// TEST[continued]
280
-
////
281
370
282
371
* Watcher
283
372
+
@@ -295,23 +384,29 @@ POST _watcher/_start
295
384
////
296
385
--
297
386
298
-
. If you use {es} security features, log in to a node host, navigate to the {es}
387
+
388
+
. {blank}
389
+
+
390
+
--
391
+
[[restore-create-file-realm-user]]
392
+
If you use {es} security features, log in to a node host, navigate to the {es}
299
393
installation directory, and add a user with the `superuser` role to the file
300
394
realm using the <<users-command,`elasticsearch-users`>> tool.
301
-
+
395
+
302
396
For example, the following command creates a user named `restore_user`.
Use this file realm user to authenticate requests until the restore operation is
310
404
complete.
405
+
--
311
406
312
407
. Use the <<cluster-update-settings,cluster update settings API>> to set
313
408
<<action-destructive-requires-name,`action.destructive_requires_name`>> to
314
-
`false`. This lets you delete indices and data streams using wildcards.
409
+
`false`. This lets you delete data streams and indices using wildcards.
315
410
+
316
411
[source,console]
317
412
----
@@ -324,24 +419,28 @@ PUT _cluster/settings
324
419
----
325
420
// TEST[setup:setup-snapshots]
326
421
327
-
. Delete existing indices and data streams on the cluster.
422
+
. Delete all existing data streams on the cluster.
328
423
+
329
424
[source,console]
330
425
----
331
-
# Delete all indices
332
-
DELETE *
426
+
DELETE _data_stream/*?expand_wildcards=all
427
+
----
428
+
// TEST[continued]
333
429
334
-
# Delete all data streams
335
-
DELETE _data_stream/*
430
+
. Delete all existing indices on the cluster.
431
+
+
432
+
[source,console]
433
+
----
434
+
DELETE *?expand_wildcards=all
336
435
----
337
436
// TEST[continued]
338
437
339
-
. Restore the entire snapshot, including the cluster state. This also restores
340
-
any system indices in the snapshot.
438
+
. Restore the entire snapshot, including the cluster state. By default,
439
+
restoring the cluster state also restores any feature states in the snapshot.
341
440
+
342
441
[source,console]
343
442
----
344
-
POST _snapshot/my_repository/my_snapshot_2099.05.06/_restore
443
+
POST _snapshot/my_repository/my_snapshot_2099.05.06/_restore
345
444
{
346
445
"indices": "*",
347
446
"include_global_state": true
@@ -354,6 +453,19 @@ POST _snapshot/my_repository/my_snapshot_2099.05.06/_restore
354
453
features you stopped:
355
454
+
356
455
--
456
+
* GeoIP database downloader
457
+
+
458
+
[source,console]
459
+
----
460
+
PUT _cluster/settings
461
+
{
462
+
"persistent": {
463
+
"ingest.geoip.downloader.enabled": true
464
+
}
465
+
}
466
+
----
467
+
//TEST[s/true/false/]
468
+
357
469
* ILM
358
470
+
359
471
[source,console]
@@ -368,6 +480,20 @@ POST _ilm/start
368
480
POST _ml/set_upgrade_mode?enabled=false
369
481
----
370
482
483
+
* Monitoring
484
+
+
485
+
[source,console]
486
+
----
487
+
PUT _cluster/settings
488
+
{
489
+
"persistent": {
490
+
"xpack.monitoring.collection.enabled": true
491
+
}
492
+
}
493
+
----
494
+
// TEST[warning:[xpack.monitoring.collection.enabled] setting was deprecated in Elasticsearch and will be removed in a future release! See the breaking changes documentation for the next major version.]
0 commit comments