node-tool.asciidoc 25 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199200201202203204205206207208209210211212213214215216217218219220221222223224225226227228229230231232233234235236237238239240241242243244245246247248249250251252253254255256257258259260261262263264265266267268269270271272273274275276277278279280281282283284285286287288289290291292293294295296297298299300301302303304305306307308309310311312313314315316317318319320321322323324325326327328329330331332333334335336337338339340341342343344345346347348349350351352353354355356357358359360361362363364365366367368369370371372373374375376377378379380381382383384385386387388389390391392393394395396397398399400401402403404405406407408409410411412413414415416417418419420421422423424425426427428429430431432433434435436437438439440441442443444445446447448449450451452453454455456457458459460461462463464465466467468469470471472473474475476477478479480481482483484485486487488489490491492493494495496497498499500501502503504505506507508509510511512513514515516517518519520521522523524525526527528529530531532533534535536537538539540541542543544545546547548549550551552553554555556557558559560561562563564565566567568569570571572573574575576577578579580581582583584585586587588589590591592593594595596597598599600601602603604605606607608609610611612613614615616617618619620621622623624625626627628629630631632633634635636637638639640641642643644645646647648649650
  1. [[node-tool]]
  2. == elasticsearch-node
  3. The `elasticsearch-node` command enables you to perform certain unsafe
  4. operations on a node that are only possible while it is shut down. This command
  5. allows you to adjust the <<modules-node,role>> of a node, unsafely edit cluster
  6. settings and may be able to recover some data after a disaster or start a node
  7. even if it is incompatible with the data on disk.
  8. [discrete]
  9. === Synopsis
  10. [source,shell]
  11. --------------------------------------------------
  12. bin/elasticsearch-node repurpose|unsafe-bootstrap|detach-cluster|override-version
  13. [-E <KeyValuePair>]
  14. [-h, --help] ([-s, --silent] | [-v, --verbose])
  15. --------------------------------------------------
  16. [discrete]
  17. === Description
  18. This tool has a number of modes:
  19. * `elasticsearch-node repurpose` can be used to delete unwanted data from a
  20. node if it used to be a <<data-node-role,data node>> or a
  21. <<master-node-role,master-eligible node>> but has been repurposed not to have one
  22. or other of these roles.
  23. * `elasticsearch-node remove-settings` can be used to remove persistent settings
  24. from the cluster state in case where it contains incompatible settings that
  25. prevent the cluster from forming.
  26. * `elasticsearch-node remove-index-settings` can be used to remove index settings
  27. from the cluster state in case where it contains incompatible index settings that
  28. prevent the cluster from forming.
  29. * `elasticsearch-node remove-customs` can be used to remove custom metadata
  30. from the cluster state in case where it contains broken metadata that
  31. prevents the cluster state from being loaded.
  32. * `elasticsearch-node unsafe-bootstrap` can be used to perform _unsafe cluster
  33. bootstrapping_. It forces one of the nodes to form a brand-new cluster on
  34. its own, using its local copy of the cluster metadata.
  35. * `elasticsearch-node detach-cluster` enables you to move nodes from one
  36. cluster to another. This can be used to move nodes into a new cluster
  37. created with the `elasticsearch-node unsafe-bootstrap` command. If unsafe
  38. cluster bootstrapping was not possible, it also enables you to move nodes
  39. into a brand-new cluster.
  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. :tool-name: node
  45. include::cli-jvm-options.asciidoc[]
  46. :!tool-name:
  47. [[node-tool-repurpose]]
  48. [discrete]
  49. ==== Changing the role of a node
  50. There may be situations where you want to repurpose a node without following
  51. the <<change-node-role,proper repurposing processes>>. The `elasticsearch-node
  52. repurpose` tool allows you to delete any excess on-disk data and start a node
  53. after repurposing it.
  54. The intended use is:
  55. * Stop the node
  56. * Update `elasticsearch.yml` by setting `node.roles` as desired.
  57. * Run `elasticsearch-node repurpose` on the node
  58. * Start the node
  59. If you run `elasticsearch-node repurpose` on a node without the `data` role and
  60. with the `master` role then it will delete any remaining shard data on that
  61. node, but it will leave the index and cluster metadata alone. If you run
  62. `elasticsearch-node repurpose` on a node without the `data` and `master` roles
  63. then it will delete any remaining shard data and index metadata, but it will
  64. leave the cluster metadata alone.
  65. [WARNING]
  66. Running this command can lead to data loss for the indices mentioned if the
  67. data contained is not available on other nodes in the cluster. Only run this
  68. tool if you understand and accept the possible consequences, and only after
  69. determining that the node cannot be repurposed cleanly.
  70. The tool provides a summary of the data to be deleted and asks for confirmation
  71. before making any changes. You can get detailed information about the affected
  72. indices and shards by passing the verbose (`-v`) option.
  73. [discrete]
  74. ==== Removing persistent cluster settings
  75. There may be situations where a node contains persistent cluster
  76. settings that prevent the cluster from forming. Since the cluster cannot form,
  77. it is not possible to remove these settings using the
  78. <<cluster-update-settings>> API.
  79. The `elasticsearch-node remove-settings` tool allows you to forcefully remove
  80. those persistent settings from the on-disk cluster state. The tool takes a
  81. list of settings as parameters that should be removed, and also supports
  82. wildcard patterns.
  83. The intended use is:
  84. * Stop the node
  85. * Run `elasticsearch-node remove-settings name-of-setting-to-remove` on the node
  86. * Repeat for all other master-eligible nodes
  87. * Start the nodes
  88. [discrete]
  89. ==== Removing index settings
  90. There may be situations where an index contains index settings
  91. that prevent the cluster from forming. Since the cluster cannot form,
  92. it is not possible to remove these settings using the
  93. <<indices-update-settings>> API.
  94. The `elasticsearch-node remove-index-settings` tool allows you to forcefully remove
  95. those index settings from the on-disk cluster state. The tool takes a
  96. list of index settings as parameters that should be removed, and also supports
  97. wildcard patterns.
  98. The intended use is:
  99. * Stop the node
  100. * Run `elasticsearch-node remove-index-settings name-of-index-setting-to-remove` on the node
  101. * Repeat for all nodes
  102. * Start the nodes
  103. [discrete]
  104. ==== Removing custom metadata from the cluster state
  105. There may be situations where a node contains custom metadata, typically
  106. provided by plugins, that prevent the node from starting up and loading
  107. the cluster from disk.
  108. The `elasticsearch-node remove-customs` tool allows you to forcefully remove
  109. the problematic custom metadata. The tool takes a list of custom metadata names
  110. as parameters that should be removed, and also supports wildcard patterns.
  111. The intended use is:
  112. * Stop the node
  113. * Run `elasticsearch-node remove-customs name-of-custom-to-remove` on the node
  114. * Repeat for all other master-eligible nodes
  115. * Start the nodes
  116. [discrete]
  117. ==== Recovering data after a disaster
  118. Sometimes {es} nodes are temporarily stopped, perhaps because of the need to
  119. perform some maintenance activity or perhaps because of a hardware failure.
  120. After you resolve the temporary condition and restart the node,
  121. it will rejoin the cluster and continue normally. Depending on your
  122. configuration, your cluster may be able to remain completely available even
  123. while one or more of its nodes are stopped.
  124. Sometimes it might not be possible to restart a node after it has stopped. For
  125. example, the node's host may suffer from a hardware problem that cannot be
  126. repaired. If the cluster is still available then you can start up a fresh node
  127. on another host and {es} will bring this node into the cluster in place of the
  128. failed node.
  129. Each node stores its data in the data directories defined by the
  130. <<path-settings,`path.data` setting>>. This means that in a disaster you can
  131. also restart a node by moving its data directories to another host, presuming
  132. that those data directories can be recovered from the faulty host.
  133. {es} <<modules-discovery-quorums,requires a response from a majority of the
  134. master-eligible nodes>> in order to elect a master and to update the cluster
  135. state. This means that if you have three master-eligible nodes then the cluster
  136. will remain available even if one of them has failed. However if two of the
  137. three master-eligible nodes fail then the cluster will be unavailable until at
  138. least one of them is restarted.
  139. In very rare circumstances it may not be possible to restart enough nodes to
  140. restore the cluster's availability. If such a disaster occurs, you should
  141. build a new cluster from a recent snapshot and re-import any data that was
  142. ingested since that snapshot was taken.
  143. However, if the disaster is serious enough then it may not be possible to
  144. recover from a recent snapshot either. Unfortunately in this case there is no
  145. way forward that does not risk data loss, but it may be possible to use the
  146. `elasticsearch-node` tool to construct a new cluster that contains some of the
  147. data from the failed cluster.
  148. [[node-tool-override-version]]
  149. [discrete]
  150. ==== Bypassing version checks
  151. The data that {es} writes to disk is designed to be read by the current version
  152. and a limited set of future versions. It cannot generally be read by older
  153. versions, nor by versions that are more than one major version newer. The data
  154. stored on disk includes the version of the node that wrote it, and {es} checks
  155. that it is compatible with this version when starting up.
  156. In rare circumstances it may be desirable to bypass this check and start up an
  157. {es} node using data that was written by an incompatible version. This may not
  158. work if the format of the stored data has changed, and it is a risky process
  159. because it is possible for the format to change in ways that {es} may
  160. misinterpret, silently leading to data loss.
  161. To bypass this check, you can use the `elasticsearch-node override-version`
  162. tool to overwrite the version number stored in the data path with the current
  163. version, causing {es} to believe that it is compatible with the on-disk data.
  164. [[node-tool-unsafe-bootstrap]]
  165. [discrete]
  166. ===== Unsafe cluster bootstrapping
  167. If there is at least one remaining master-eligible node, but it is not possible
  168. to restart a majority of them, then the `elasticsearch-node unsafe-bootstrap`
  169. command will unsafely override the cluster's <<modules-discovery-voting,voting
  170. configuration>> as if performing another
  171. <<modules-discovery-bootstrap-cluster,cluster bootstrapping process>>.
  172. The target node can then form a new cluster on its own by using
  173. the cluster metadata held locally on the target node.
  174. [WARNING]
  175. These steps can lead to arbitrary data loss since the target node may not hold the latest cluster
  176. metadata, and this out-of-date metadata may make it impossible to use some or
  177. all of the indices in the cluster.
  178. Since unsafe bootstrapping forms a new cluster containing a single node, once
  179. you have run it you must use the <<node-tool-detach-cluster,`elasticsearch-node
  180. detach-cluster` tool>> to migrate any other surviving nodes from the failed
  181. cluster into this new cluster.
  182. When you run the `elasticsearch-node unsafe-bootstrap` tool it will analyse the
  183. state of the node and ask for confirmation before taking any action. Before
  184. asking for confirmation it reports the term and version of the cluster state on
  185. the node on which it runs as follows:
  186. [source,txt]
  187. ----
  188. Current node cluster state (term, version) pair is (4, 12)
  189. ----
  190. If you have a choice of nodes on which to run this tool then you should choose
  191. one with a term that is as large as possible. If there is more than one
  192. node with the same term, pick the one with the largest version.
  193. This information identifies the node with the freshest cluster state, which minimizes the
  194. quantity of data that might be lost. For example, if the first node reports
  195. `(4, 12)` and a second node reports `(5, 3)`, then the second node is preferred
  196. since its term is larger. However if the second node reports `(3, 17)` then
  197. the first node is preferred since its term is larger. If the second node
  198. reports `(4, 10)` then it has the same term as the first node, but has a
  199. smaller version, so the first node is preferred.
  200. [WARNING]
  201. Running this command can lead to arbitrary data loss. Only run this tool if you
  202. understand and accept the possible consequences and have exhausted all other
  203. possibilities for recovery of your cluster.
  204. The sequence of operations for using this tool are as follows:
  205. 1. Make sure you have really lost access to at least half of the
  206. master-eligible nodes in the cluster, and they cannot be repaired or recovered
  207. by moving their data paths to healthy hardware.
  208. 2. Stop **all** remaining nodes.
  209. 3. Choose one of the remaining master-eligible nodes to become the new elected
  210. master as described above.
  211. 4. On this node, run the `elasticsearch-node unsafe-bootstrap` command as shown
  212. below. Verify that the tool reported `Master node was successfully
  213. bootstrapped`.
  214. 5. Start this node and verify that it is elected as the master node.
  215. 6. Run the <<node-tool-detach-cluster,`elasticsearch-node detach-cluster`
  216. tool>>, described below, on every other node in the cluster.
  217. 7. Start all other nodes and verify that each one joins the cluster.
  218. 8. Investigate the data in the cluster to discover if any was lost during this
  219. process.
  220. When you run the tool it will make sure that the node that is being used to
  221. bootstrap the cluster is not running. It is important that all other
  222. master-eligible nodes are also stopped while this tool is running, but the tool
  223. does not check this.
  224. The message `Master node was successfully bootstrapped` does not mean that
  225. there has been no data loss, it just means that tool was able to complete its
  226. job.
  227. [[node-tool-detach-cluster]]
  228. [discrete]
  229. ===== Detaching nodes from their cluster
  230. It is unsafe for nodes to move between clusters, because different clusters
  231. have completely different cluster metadata. There is no way to safely merge the
  232. metadata from two clusters together.
  233. To protect against inadvertently joining the wrong cluster, each cluster
  234. creates a unique identifier, known as the _cluster UUID_, when it first starts
  235. up. Every node records the UUID of its cluster and refuses to join a
  236. cluster with a different UUID.
  237. However, if a node's cluster has permanently failed then it may be desirable to
  238. try and move it into a new cluster. The `elasticsearch-node detach-cluster`
  239. command lets you detach a node from its cluster by resetting its cluster UUID.
  240. It can then join another cluster with a different UUID.
  241. For example, after unsafe cluster bootstrapping you will need to detach all the
  242. other surviving nodes from their old cluster so they can join the new,
  243. unsafely-bootstrapped cluster.
  244. Unsafe cluster bootstrapping is only possible if there is at least one
  245. surviving master-eligible node. If there are no remaining master-eligible nodes
  246. then the cluster metadata is completely lost. However, the individual data
  247. nodes also contain a copy of the index metadata corresponding with their shards. This sometimes allows a new cluster to import these shards as
  248. <<dangling-indices,dangling indices>>. You can sometimes
  249. recover some indices after the loss of all main-eligible nodes in a cluster
  250. by creating a new cluster and then using the `elasticsearch-node
  251. detach-cluster` command to move any surviving nodes into this new cluster. Once the new cluster is fully formed,
  252. use the <<dangling-indices-api,Dangling indices API>> to list, import or delete
  253. any dangling indices.
  254. There is a risk of data loss when importing a dangling index because data nodes
  255. may not have the most recent copy of the index metadata and do not have any
  256. information about <<docs-replication,which shard copies are in-sync>>. This
  257. means that a stale shard copy may be selected to be the primary, and some of
  258. the shards may be incompatible with the imported mapping.
  259. [WARNING]
  260. Execution of this command can lead to arbitrary data loss. Only run this tool
  261. if you understand and accept the possible consequences and have exhausted all
  262. other possibilities for recovery of your cluster.
  263. The sequence of operations for using this tool are as follows:
  264. 1. Make sure you have really lost access to every one of the master-eligible
  265. nodes in the cluster, and they cannot be repaired or recovered by moving their
  266. data paths to healthy hardware.
  267. 2. Start a new cluster and verify that it is healthy. This cluster may comprise
  268. one or more brand-new master-eligible nodes, or may be an unsafely-bootstrapped
  269. cluster formed as described above.
  270. 3. Stop **all** remaining data nodes.
  271. 4. On each data node, run the `elasticsearch-node detach-cluster` tool as shown
  272. below. Verify that the tool reported `Node was successfully detached from the
  273. cluster`.
  274. 5. If necessary, configure each data node to
  275. <<discovery-hosts-providers,discover the new cluster>>.
  276. 6. Start each data node and verify that it has joined the new cluster.
  277. 7. Wait for all recoveries to have completed, and investigate the data in the
  278. cluster to discover if any was lost during this process. Use the
  279. <<dangling-indices-api,Dangling indices API>> to list, import or delete any
  280. dangling indices.
  281. The message `Node was successfully detached from the cluster` does not mean
  282. that there has been no data loss, it just means that tool was able to complete
  283. its job.
  284. [discrete]
  285. [[node-tool-parameters]]
  286. === Parameters
  287. `repurpose`:: Delete excess data when a node's roles are changed.
  288. `unsafe-bootstrap`:: Specifies to unsafely bootstrap this node as a new
  289. one-node cluster.
  290. `detach-cluster`:: Specifies to unsafely detach this node from its cluster so
  291. it can join a different cluster.
  292. `override-version`:: Overwrites the version number stored in the data path so
  293. that a node can start despite being incompatible with the on-disk data.
  294. `remove-settings`:: Forcefully removes the provided persistent cluster settings
  295. from the on-disk cluster state.
  296. `-E <KeyValuePair>`:: Configures a setting.
  297. `-h, --help`:: Returns all of the command parameters.
  298. `-s, --silent`:: Shows minimal output.
  299. `-v, --verbose`:: Shows verbose output.
  300. [discrete]
  301. === Examples
  302. [discrete]
  303. ==== Repurposing a node as a dedicated master node
  304. In this example, a former data node is repurposed as a dedicated master node.
  305. First update the node's settings to `node.roles: [ "master" ]` in its
  306. `elasticsearch.yml` config file. Then run the `elasticsearch-node repurpose`
  307. command to find and remove excess shard data:
  308. [source,txt]
  309. ----
  310. node$ ./bin/elasticsearch-node repurpose
  311. WARNING: Elasticsearch MUST be stopped before running this tool.
  312. Found 2 shards in 2 indices to clean up
  313. Use -v to see list of paths and indices affected
  314. Node is being re-purposed as master and no-data. Clean-up of shard data will be performed.
  315. Do you want to proceed?
  316. Confirm [y/N] y
  317. Node successfully repurposed to master and no-data.
  318. ----
  319. [discrete]
  320. ==== Repurposing a node as a coordinating-only node
  321. In this example, a node that previously held data is repurposed as a
  322. coordinating-only node. First update the node's settings to `node.roles: []` in
  323. its `elasticsearch.yml` config file. Then run the `elasticsearch-node repurpose`
  324. command to find and remove excess shard data and index metadata:
  325. [source,txt]
  326. ----
  327. node$./bin/elasticsearch-node repurpose
  328. WARNING: Elasticsearch MUST be stopped before running this tool.
  329. Found 2 indices (2 shards and 2 index meta data) to clean up
  330. Use -v to see list of paths and indices affected
  331. Node is being re-purposed as no-master and no-data. Clean-up of index data will be performed.
  332. Do you want to proceed?
  333. Confirm [y/N] y
  334. Node successfully repurposed to no-master and no-data.
  335. ----
  336. [discrete]
  337. ==== Removing persistent cluster settings
  338. If your nodes contain persistent cluster settings that prevent the cluster
  339. from forming, i.e., can't be removed using the <<cluster-update-settings>> API,
  340. you can run the following commands to remove one or more cluster settings.
  341. [source,txt]
  342. ----
  343. node$ ./bin/elasticsearch-node remove-settings xpack.monitoring.exporters.my_exporter.host
  344. WARNING: Elasticsearch MUST be stopped before running this tool.
  345. The following settings will be removed:
  346. xpack.monitoring.exporters.my_exporter.host: "10.1.2.3"
  347. You should only run this tool if you have incompatible settings in the
  348. cluster state that prevent the cluster from forming.
  349. This tool can cause data loss and its use should be your last resort.
  350. Do you want to proceed?
  351. Confirm [y/N] y
  352. Settings were successfully removed from the cluster state
  353. ----
  354. You can also use wildcards to remove multiple settings, for example using
  355. [source,txt]
  356. ----
  357. node$ ./bin/elasticsearch-node remove-settings xpack.monitoring.*
  358. ----
  359. [discrete]
  360. ==== Removing index settings
  361. If your indices contain index settings that prevent the cluster
  362. from forming, you can run the following command to remove one
  363. or more index settings.
  364. [source,txt]
  365. ----
  366. node$ ./bin/elasticsearch-node remove-index-settings index.my_plugin.foo
  367. WARNING: Elasticsearch MUST be stopped before running this tool.
  368. You should only run this tool if you have incompatible index settings in the
  369. cluster state that prevent the cluster from forming.
  370. This tool can cause data loss and its use should be your last resort.
  371. Do you want to proceed?
  372. Confirm [y/N] y
  373. Index settings were successfully removed from the cluster state
  374. ----
  375. You can also use wildcards to remove multiple index settings, for example using
  376. [source,txt]
  377. ----
  378. node$ ./bin/elasticsearch-node remove-index-settings index.my_plugin.*
  379. ----
  380. [discrete]
  381. ==== Removing custom metadata from the cluster state
  382. If the on-disk cluster state contains custom metadata that prevents the node
  383. from starting up and loading the cluster state, you can run the following
  384. commands to remove this custom metadata.
  385. [source,txt]
  386. ----
  387. node$ ./bin/elasticsearch-node remove-customs snapshot_lifecycle
  388. WARNING: Elasticsearch MUST be stopped before running this tool.
  389. The following customs will be removed:
  390. snapshot_lifecycle
  391. You should only run this tool if you have broken custom metadata in the
  392. cluster state that prevents the cluster state from being loaded.
  393. This tool can cause data loss and its use should be your last resort.
  394. Do you want to proceed?
  395. Confirm [y/N] y
  396. Customs were successfully removed from the cluster state
  397. ----
  398. [discrete]
  399. ==== Unsafe cluster bootstrapping
  400. Suppose your cluster had five master-eligible nodes and you have permanently
  401. lost three of them, leaving two nodes remaining.
  402. * Run the tool on the first remaining node, but answer `n` at the confirmation
  403. step.
  404. [source,txt]
  405. ----
  406. node_1$ ./bin/elasticsearch-node unsafe-bootstrap
  407. WARNING: Elasticsearch MUST be stopped before running this tool.
  408. Current node cluster state (term, version) pair is (4, 12)
  409. You should only run this tool if you have permanently lost half or more
  410. of the master-eligible nodes in this cluster, and you cannot restore the
  411. cluster from a snapshot. This tool can cause arbitrary data loss and its
  412. use should be your last resort. If you have multiple surviving master
  413. eligible nodes, you should run this tool on the node with the highest
  414. cluster state (term, version) pair.
  415. Do you want to proceed?
  416. Confirm [y/N] n
  417. ----
  418. * Run the tool on the second remaining node, and again answer `n` at the
  419. confirmation step.
  420. [source,txt]
  421. ----
  422. node_2$ ./bin/elasticsearch-node unsafe-bootstrap
  423. WARNING: Elasticsearch MUST be stopped before running this tool.
  424. Current node cluster state (term, version) pair is (5, 3)
  425. You should only run this tool if you have permanently lost half or more
  426. of the master-eligible nodes in this cluster, and you cannot restore the
  427. cluster from a snapshot. This tool can cause arbitrary data loss and its
  428. use should be your last resort. If you have multiple surviving master
  429. eligible nodes, you should run this tool on the node with the highest
  430. cluster state (term, version) pair.
  431. Do you want to proceed?
  432. Confirm [y/N] n
  433. ----
  434. * Since the second node has a greater term it has a fresher cluster state, so
  435. it is better to unsafely bootstrap the cluster using this node:
  436. [source,txt]
  437. ----
  438. node_2$ ./bin/elasticsearch-node unsafe-bootstrap
  439. WARNING: Elasticsearch MUST be stopped before running this tool.
  440. Current node cluster state (term, version) pair is (5, 3)
  441. You should only run this tool if you have permanently lost half or more
  442. of the master-eligible nodes in this cluster, and you cannot restore the
  443. cluster from a snapshot. This tool can cause arbitrary data loss and its
  444. use should be your last resort. If you have multiple surviving master
  445. eligible nodes, you should run this tool on the node with the highest
  446. cluster state (term, version) pair.
  447. Do you want to proceed?
  448. Confirm [y/N] y
  449. Master node was successfully bootstrapped
  450. ----
  451. [discrete]
  452. ==== Detaching nodes from their cluster
  453. After unsafely bootstrapping a new cluster, run the `elasticsearch-node
  454. detach-cluster` command to detach all remaining nodes from the failed cluster
  455. so they can join the new cluster:
  456. [source, txt]
  457. ----
  458. node_3$ ./bin/elasticsearch-node detach-cluster
  459. WARNING: Elasticsearch MUST be stopped before running this tool.
  460. You should only run this tool if you have permanently lost all of the
  461. master-eligible nodes in this cluster and you cannot restore the cluster
  462. from a snapshot, or you have already unsafely bootstrapped a new cluster
  463. by running `elasticsearch-node unsafe-bootstrap` on a master-eligible
  464. node that belonged to the same cluster as this node. This tool can cause
  465. arbitrary data loss and its use should be your last resort.
  466. Do you want to proceed?
  467. Confirm [y/N] y
  468. Node was successfully detached from the cluster
  469. ----
  470. [discrete]
  471. ==== Bypassing version checks
  472. Run the `elasticsearch-node override-version` command to overwrite the version
  473. stored in the data path so that a node can start despite being incompatible
  474. with the data stored in the data path:
  475. [source, txt]
  476. ----
  477. node$ ./bin/elasticsearch-node override-version
  478. WARNING: Elasticsearch MUST be stopped before running this tool.
  479. This data path was last written by Elasticsearch version [x.x.x] and may no
  480. longer be compatible with Elasticsearch version [y.y.y]. This tool will bypass
  481. this compatibility check, allowing a version [y.y.y] node to start on this data
  482. path, but a version [y.y.y] node may not be able to read this data or may read
  483. it incorrectly leading to data loss.
  484. You should not use this tool. Instead, continue to use a version [x.x.x] node
  485. on this data path. If necessary, you can use reindex-from-remote to copy the
  486. data from here into an older cluster.
  487. Do you want to proceed?
  488. Confirm [y/N] y
  489. Successfully overwrote this node's metadata to bypass its version compatibility checks.
  490. ----