4
4
The `elasticsearch-node` command enables you to perform certain unsafe
5
5
operations on a node that are only possible while it is shut down. This command
6
6
allows you to adjust the <<modules-node,role>> of a node and may be able to
7
- recover some data after a disaster.
7
+ recover some data after a disaster or start a node even if it is incompatible
8
+ with the data on disk.
8
9
9
10
[float]
10
11
=== Synopsis
11
12
12
13
[source,shell]
13
14
--------------------------------------------------
14
- bin/elasticsearch-node repurpose|unsafe-bootstrap|detach-cluster
15
+ bin/elasticsearch-node repurpose|unsafe-bootstrap|detach-cluster|override-version
15
16
[--ordinal <Integer>] [-E <KeyValuePair>]
16
17
[-h, --help] ([-s, --silent] | [-v, --verbose])
17
18
--------------------------------------------------
18
19
19
20
[float]
20
21
=== Description
21
22
22
- This tool has three modes:
23
+ This tool has four modes:
23
24
24
25
* `elasticsearch-node repurpose` can be used to delete unwanted data from a
25
26
node if it used to be a <<data-node,data node>> or a
@@ -36,6 +37,11 @@ This tool has three modes:
36
37
cluster bootstrapping was not possible, it also enables you to move nodes
37
38
into a brand-new cluster.
38
39
40
+ * `elasticsearch-node override-version` enables you to start up a node
41
+ even if the data in the data path was written by an incompatible version of
42
+ {es}. This may sometimes allow you to downgrade to an earlier version of
43
+ {es}.
44
+
39
45
[[node-tool-repurpose]]
40
46
[float]
41
47
==== Changing the role of a node
@@ -109,6 +115,25 @@ way forward that does not risk data loss, but it may be possible to use the
109
115
`elasticsearch-node` tool to construct a new cluster that contains some of the
110
116
data from the failed cluster.
111
117
118
+ [[node-tool-override-version]]
119
+ [float]
120
+ ==== Bypassing version checks
121
+
122
+ The data that {es} writes to disk is designed to be read by the current version
123
+ and a limited set of future versions. It cannot generally be read by older
124
+ versions, nor by versions that are more than one major version newer. The data
125
+ stored on disk includes the version of the node that wrote it, and {es} checks
126
+ that it is compatible with this version when starting up.
127
+
128
+ In rare circumstances it may be desirable to bypass this check and start up an
129
+ {es} node using data that was written by an incompatible version. This may not
130
+ work if the format of the stored data has changed, and it is a risky process
131
+ because it is possible for the format to change in ways that {es} may
132
+ misinterpret, silently leading to data loss.
133
+
134
+ To bypass this check, you can use the `elasticsearch-node override-version`
135
+ tool to overwrite the version number stored in the data path with the current
136
+ version, causing {es} to believe that it is compatible with the on-disk data.
112
137
113
138
[[node-tool-unsafe-bootstrap]]
114
139
[float]
@@ -262,6 +287,9 @@ one-node cluster.
262
287
`detach-cluster`:: Specifies to unsafely detach this node from its cluster so
263
288
it can join a different cluster.
264
289
290
+ `override-version`:: Overwrites the version number stored in the data path so
291
+ that a node can start despite being incompatible with the on-disk data.
292
+
265
293
`--ordinal <Integer>`:: If there is <<max-local-storage-nodes,more than one
266
294
node sharing a data path>> then this specifies which node to target. Defaults
267
295
to `0`, meaning to use the first node in the data path.
@@ -423,3 +451,32 @@ Do you want to proceed?
423
451
Confirm [y/N] y
424
452
Node was successfully detached from the cluster
425
453
----
454
+
455
+ [float]
456
+ ==== Bypassing version checks
457
+
458
+ Run the `elasticsearch-node override-version` command to overwrite the version
459
+ stored in the data path so that a node can start despite being incompatible
460
+ with the data stored in the data path:
461
+
462
+ [source, txt]
463
+ ----
464
+ node$ ./bin/elasticsearch-node override-version
465
+
466
+ WARNING: Elasticsearch MUST be stopped before running this tool.
467
+
468
+ This data path was last written by Elasticsearch version [x.x.x] and may no
469
+ longer be compatible with Elasticsearch version [y.y.y]. This tool will bypass
470
+ this compatibility check, allowing a version [y.y.y] node to start on this data
471
+ path, but a version [y.y.y] node may not be able to read this data or may read
472
+ it incorrectly leading to data loss.
473
+
474
+ You should not use this tool. Instead, continue to use a version [x.x.x] node
475
+ on this data path. If necessary, you can use reindex-from-remote to copy the
476
+ data from here into an older cluster.
477
+
478
+ Do you want to proceed?
479
+
480
+ Confirm [y/N] y
481
+ Successfully overwrote this node's metadata to bypass its version compatibility checks.
482
+ ----
0 commit comments