Change the default of `include_global_state` from true to false for restores
This changes the default value to be false *only* for restore operations. Resolves #18569
This commit is contained in:
parent
762bbdbd0c
commit
c637fea84b
|
@ -57,7 +57,7 @@ public class RestoreSnapshotRequest extends MasterNodeRequest<RestoreSnapshotReq
|
||||||
private String renamePattern;
|
private String renamePattern;
|
||||||
private String renameReplacement;
|
private String renameReplacement;
|
||||||
private boolean waitForCompletion;
|
private boolean waitForCompletion;
|
||||||
private boolean includeGlobalState = true;
|
private boolean includeGlobalState = false;
|
||||||
private boolean partial = false;
|
private boolean partial = false;
|
||||||
private boolean includeAliases = true;
|
private boolean includeAliases = true;
|
||||||
private Settings settings = EMPTY_SETTINGS;
|
private Settings settings = EMPTY_SETTINGS;
|
||||||
|
|
|
@ -277,3 +277,9 @@ should be used instead.
|
||||||
|
|
||||||
The setting `bootstrap.mlockall` has been renamed to
|
The setting `bootstrap.mlockall` has been renamed to
|
||||||
`bootstrap.memory_lock`.
|
`bootstrap.memory_lock`.
|
||||||
|
|
||||||
|
==== Snapshot settings
|
||||||
|
|
||||||
|
The default setting `include_global_state` for restoring snapshots has been
|
||||||
|
changed from `true` to `false`. It has not been changed for taking snapshots and
|
||||||
|
still defaults to `true` in that case.
|
||||||
|
|
|
@ -323,13 +323,17 @@ POST /_snapshot/my_backup/snapshot_1/_restore
|
||||||
-----------------------------------
|
-----------------------------------
|
||||||
// CONSOLE
|
// CONSOLE
|
||||||
|
|
||||||
By default, all indices in the snapshot as well as cluster state are restored. It's possible to select indices that
|
By default, all indices in the snapshot are restored, and the cluster state is
|
||||||
should be restored as well as prevent global cluster state from being restored by using `indices` and
|
*not* restored. It's possible to select indices that should be restored as well
|
||||||
`include_global_state` options in the restore request body. The list of indices supports
|
as to allow the global cluster state from being restored by using `indices` and
|
||||||
<<search-multi-index-type,multi index syntax>>. The `rename_pattern` and `rename_replacement` options can be also used to
|
`include_global_state` options in the restore request body. The list of indices
|
||||||
rename index on restore using regular expression that supports referencing the original text as explained
|
supports <<search-multi-index-type,multi index syntax>>. The `rename_pattern`
|
||||||
|
and `rename_replacement` options can be also used to rename index on restore
|
||||||
|
using regular expression that supports referencing the original text as
|
||||||
|
explained
|
||||||
http://docs.oracle.com/javase/6/docs/api/java/util/regex/Matcher.html#appendReplacement(java.lang.StringBuffer,%20java.lang.String)[here].
|
http://docs.oracle.com/javase/6/docs/api/java/util/regex/Matcher.html#appendReplacement(java.lang.StringBuffer,%20java.lang.String)[here].
|
||||||
Set `include_aliases` to `false` to prevent aliases from being restored together with associated indices
|
Set `include_aliases` to `false` to prevent aliases from being restored together
|
||||||
|
with associated indices
|
||||||
|
|
||||||
[source,js]
|
[source,js]
|
||||||
-----------------------------------
|
-----------------------------------
|
||||||
|
@ -337,19 +341,22 @@ POST /_snapshot/my_backup/snapshot_1/_restore
|
||||||
{
|
{
|
||||||
"indices": "index_1,index_2",
|
"indices": "index_1,index_2",
|
||||||
"ignore_unavailable": "true",
|
"ignore_unavailable": "true",
|
||||||
"include_global_state": false,
|
"include_global_state": true,
|
||||||
"rename_pattern": "index_(.+)",
|
"rename_pattern": "index_(.+)",
|
||||||
"rename_replacement": "restored_index_$1"
|
"rename_replacement": "restored_index_$1"
|
||||||
}
|
}
|
||||||
-----------------------------------
|
-----------------------------------
|
||||||
// CONSOLE
|
// CONSOLE
|
||||||
|
|
||||||
The restore operation can be performed on a functioning cluster. However, an existing index can be only restored if it's
|
The restore operation can be performed on a functioning cluster. However, an
|
||||||
<<indices-open-close,closed>> and has the same number of shards as the index in the snapshot.
|
existing index can be only restored if it's <<indices-open-close,closed>> and
|
||||||
The restore operation automatically opens restored indices if they were closed and creates new indices if they
|
has the same number of shards as the index in the snapshot. The restore
|
||||||
didn't exist in the cluster. If cluster state is restored, the restored templates that don't currently exist in the
|
operation automatically opens restored indices if they were closed and creates
|
||||||
cluster are added and existing templates with the same name are replaced by the restored templates. The restored
|
new indices if they didn't exist in the cluster. If cluster state is restored
|
||||||
persistent settings are added to the existing persistent settings.
|
with `include_cluster_state` (defaults to `false`), the restored templates that
|
||||||
|
don't currently exist in the cluster are added and existing templates with the
|
||||||
|
same name are replaced by the restored templates. The restored persistent
|
||||||
|
settings are added to the existing persistent settings.
|
||||||
|
|
||||||
[float]
|
[float]
|
||||||
==== Partial restore
|
==== Partial restore
|
||||||
|
|
Loading…
Reference in New Issue