1
0

backup-cluster-config.asciidoc 2.7 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960
  1. [[backup-cluster-configuration]]
  2. === Back up a cluster's configuration
  3. ++++
  4. <titleabbrev>Back up the cluster configuration</titleabbrev>
  5. ++++
  6. In addition to backing up the data in a cluster, it is important to back up its configuration--especially when the cluster becomes large and difficult to
  7. reconstruct.
  8. Configuration information resides in
  9. <<config-files-location, regular text files>> on every cluster node. Sensitive
  10. setting values such as passwords for the {watcher} notification servers, are
  11. specified inside a binary secure container, the
  12. <<secure-settings, elasticsearch.keystore>> file. Some setting values are
  13. file paths to the associated configuration data, such as the ingest geo ip
  14. database. All these files are contained inside the `ES_PATH_CONF` directory.
  15. NOTE: All changes to configuration files are done by manually editing the files
  16. or using command line utilities, but *not* through APIs. In practice, these
  17. changes are infrequent after the initial setup.
  18. We recommend that you take regular (ideally, daily) backups of your {es} config
  19. (`$ES_PATH_CONF`) directory using the file backup software of your choice.
  20. TIP: We recommend that you have a configuration management plan for these
  21. configuration files. You may wish to check them into version control, or
  22. provision them though your choice of configuration management tool.
  23. Some of these files may contain sensitive data such as passwords and TLS keys,
  24. therefore you should investigate whether your backup software and/or storage
  25. solution are able to encrypt this data.
  26. Some settings in configuration files might be overridden by
  27. <<cluster-update-settings,cluster settings>>. You can capture these settings in
  28. a *data* backup snapshot by specifying the `include_global_state: true` (default)
  29. parameter for the snapshot API. Alternatively, you can extract these
  30. configuration values in text format by using the
  31. <<cluster-get-settings, get settings API>>:
  32. [source,console]
  33. --------------------------------------------------
  34. GET _cluster/settings?pretty&flat_settings&filter_path=persistent
  35. --------------------------------------------------
  36. You can store the output of this as a file together with the rest of
  37. configuration files.
  38. [NOTE]
  39. ====
  40. * Transient settings are not considered for backup.
  41. * {es} {security-features} store configuration data such as role definitions and
  42. API keys inside a dedicate special index. This "system" data,
  43. complements the <<secure-settings, security settings>> configuration and should
  44. be <<backup-security-index-configuration, backed up as well>>.
  45. * Other {stack} components, like Kibana and {ml-cap}, store their configuration
  46. data inside other dedicated indices. From the {es} perspective these are just data
  47. so you can use the regular <<backup-cluster-data, data backup>> process.
  48. ====