Blob Blame History Raw
# Create etcd backup
This SOP should be followed in the following scenarios:

- When the need exists to create an etcd backup. 
- When shutting a cluster down gracefully.

## Steps

1. Connect to the admin node for either `staging` or `production`. See the inventory `ocp` for produduction, `ocp-stg` for staging. The hostname is in the group `ocp-ci-management` or `ocp-stg-ci-management`.

```
ssh <admin-node>
```

2. Become the ocp administrator user, check the hostvars associated with the host in the previous step.

```
sudo su <ocp-admin-user>
```

3. Run the cluster backup script:

```
~/bin/ocp-etcd-backup
```

4. This will save an etcd snapshot in the `~/ocp_backups` location.

5. These snapshots are taken nightly at `02:00 UTC` and rsynced to a backup storage device.

### Resources

- [1] [Creating an etcd backup](https://docs.openshift.com/container-platform/4.5/backup_and_restore/backing-up-etcd.html#backing-up-etcd-data_backup-etcd)