# How To Identify the Master Node With Latest ETCD Backup

## Problem

How to identify which Master node has the latest ETCD backup/snapshot?

## Environment

* Platform9 Managed Kubernetes - All Versions
* ETCD

## Procedure

1. The backup is run on only one of the master nodes part of the cluster. You can identify the master node on which the recent backup was completed successfully. The output will give you the NodeIP/Nodename on which the most recent backups are stored.

{% tabs %}
{% tab title="Sample Output" %}

```none
# kubectl get pods -n kube-system -o wide | grep -i etcd-backup
NAME                                     READY   STATUS      RESTARTS   AGE   IP              NODE
etcd-backup-27407100-njkb6               0/2     Completed   0          87m   10.128.147.106  track2
etcd-backup-27407130-4kf9g               0/2     Completed   0          57m   10.128.147.106  track2
etcd-backup-27407160-vj9w9               0/2     Completed   0          27m   10.128.147.106  track2
```

{% endtab %}
{% endtabs %}

{% tabs %}
{% tab title="Sample Output" %}

```none
[root@track2 ~]# ls -lrt /etc/pf9/etcd-backup
total 74172
-rw-------. 1 root root 25313312 Feb  9 17:30 etcd-snapshot-2022-02-09_17:30:04_UTC.db
-rw-------. 1 root root 25313312 Feb  9 18:00 etcd-snapshot-2022-02-09_18:00:05_UTC.db
-rw-------. 1 root root 25313312 Feb  9 18:30 etcd-snapshot-2022-02-09_18:30:04_UTC.db
```

{% endtab %}
{% endtabs %}

{% hint style="info" %}
**Info**

The default backup path is `/etc/pf9/etcd-backup`. The backup path and interval are configurable from the U/I during cluster creation OR using the Edit Cluster option on existing clusters.

The steps to enable/disable ETCD Backup and configure its parameters using Qbert API can be referenced here [How-To Enable ETCD Backup Using Qbert API](https://platform9.com/kb/kubernetes/how-to-enable-etcd-backup-using-qbert-api).
{% endhint %}


---

# Agent Instructions: Querying This Documentation

If you need additional information that is not directly available in this page, you can query the documentation dynamically by asking a question.

Perform an HTTP GET request on the current page URL with the `ask` query parameter:

```
GET https://platform9.com/kb/pmk/how-to/how-to-identify-master-node-with-latest-etcd-backup.md?ask=<question>
```

The question should be specific, self-contained, and written in natural language.
The response will contain a direct answer to the question and relevant excerpts and sources from the documentation.

Use this mechanism when the answer is not explicitly present in the current page, you need clarification or additional context, or you want to retrieve related documentation sections.
