1
0
mirror of https://github.com/openshift/openshift-docs.git synced 2026-02-05 12:46:18 +01:00
Files
openshift-docs/etcd/etcd-backup-restore/etcd-backup.adoc
2025-11-20 17:24:32 +00:00

38 lines
2.1 KiB
Plaintext

//NOTE TO CONTRIBUTORS:
//
//If you update any of the content in this assembly file, be sure to also make the same changes in the assemblies in the following file: backup_and_restore/control_plane_backup_and_restore/backing-up-etcd.adoc.
:_mod-docs-content-type: ASSEMBLY
[id="etcd-backup"]
include::_attributes/common-attributes.adoc[]
= Backing up and restoring etcd data
:context: etcd-backup
toc::[]
As the key-value store for {product-title}, etcd persists the state of all resource objects.
Back up the etcd data for your cluster regularly and store it in a secure location, ideally outside the {product-title} environment. Do not take an etcd backup before the first certificate rotation completes, which occurs 24 hours after installation, otherwise the backup will contain expired certificates. It is also recommended to take etcd backups during non-peak usage hours because the etcd snapshot has a high I/O cost.
Be sure to take an etcd backup before you update your cluster. Taking a backup before you update is important because when you restore your cluster, you must use an etcd backup that was taken from the same z-stream release. For example, an {product-title} 4.17.5 cluster must use an etcd backup that was taken from 4.17.5.
[IMPORTANT]
====
Back up your cluster's etcd data by performing a single invocation of the backup script on a control plane host. Do not take a backup for each control plane host.
====
After you have an etcd backup, you can xref:../../backup_and_restore/control_plane_backup_and_restore/disaster_recovery/scenario-2-restoring-cluster-state.adoc#dr-restoring-cluster-state[restore to a previous cluster state].
// Backing up etcd data
include::modules/backup-etcd.adoc[leveloffset=+1]
[role="_additional-resources"]
.Additional resources
* xref:../../hosted_control_planes/hcp_high_availability/hcp-recovering-etcd-cluster.adoc#hcp-recovering-etcd-cluster[Recovering an unhealthy etcd cluster]
// Creating automated etcd backups
include::modules/etcd-creating-automated-backups.adoc[leveloffset=+1]
include::modules/creating-single-etcd-backup.adoc[leveloffset=+2]
include::modules/creating-recurring-etcd-backups.adoc[leveloffset=+2]