- [Backup Consul Data and State tutorial](/consul/tutorials/production-deploy/backup-and-restore)
**2.** Temporarily modify your Consul configuration so that its [log_level](/consul/docs/agent/config/cli-flags#_log_level)
is set to `debug`. After doing this, issue the following command on your servers to
2. Temporarily modify your Consul configuration to set the agent's [`log_level`](/consul/docs/agent/config/cli-flags#_log_level) is set to `debug`. Then issue the following command on your servers to
reload the configuration:
```
consul reload
```shell-session
$ consul reload
```
This change will give you more information to work with in the event something goes wrong.
When you change the cluster's log level, Consul gives you more information to work with in the event that something goes wrong.
## Perform the Upgrade
### Enterprise upgrades
**1.** Issue the following command to discover which server is currently the leader:
<Note>
To experience a smoother upgrade process on Consul Enterprise, we recommend that you disable the upgrade migration feature.
</Note>
```
consul operator raft list-peers
```
Consul Enterprise supports [automated upgrades](/consul/docs/enterprise/upgrades), but the autopilot feature may cause a node running an updated Consul version to elect a new leader before the version is updated on the existing cluster leader.
You should receive output similar to this (exact formatting and content may differ based on version):
If your datacenter runs Consul Enterprise, update your server agent configuration file to disable autopilot's upgrade migration or run the following CLI command:
Check whether the `commit_index` and `last_log_index` fields have the same value. If done properly,
this should avoid an unexpected leadership election due to loss of quorum.
Take note of which agent is the leader.
**4.** Double-check that all servers are showing up in the cluster as expected and are on
the correct version by issuing:
2. Copy the new `consul` binary onto your servers and replace the existing binary with the new one.
```
consul members
```
3. Use a service management system such as systemd or upstart to restart the Consul service on each server. You must restart follower server agents first, leaving the leader agent for last. If you are not using a service management system, you must restart the agent manually.
You should receive output similar to this:
To validate that the agent has rejoined the cluster and is in sync with the leader after you restart it, issue the following command to the agent:
```
Node Address Status Type Build Protocol DC
dc1-node1 10.11.0.2:8301 alive server 1.8.3 2 dc1
dc1-node2 10.11.0.3:8301 alive server 1.8.3 2 dc1
dc1-node3 10.11.0.4:8301 alive server 1.8.3 2 dc1
```
```shell-session
$ consul info
```
Also double-check the raft state to make sure there is a leader and sufficient voters:
Check whether the `commit_index` and `last_log_index` fields have the same value. If done properly,
this should avoid an unexpected leadership election due to loss of quorum.
```
consul operator raft list-peers
```
4. Double-check that all servers joined the cluster as expected and run the correct version. Issue the following command:
5. Set your `log_level` back to its original value and issue the following command
on your servers to reload the configuration:
```
consul reload
```
```shell-session
$ consul reload
```
## Troubleshooting
@ -164,7 +169,7 @@ Most problems with upgrading occur due to either failing to upgrade the leader a
or failing to wait for a follower agent to fully rejoin a cluster before moving
on to another server. This can cause a loss of quorum and occasionally can result in
all of your servers attempting to kick off leadership elections endlessly without ever
reaching a quorum and electing a leader.
reaching a quorum and electing a leader. Consul Enterprise users should [disable upgrade migration](#enterprise-upgrades) to prevent autopilot from prematurely electing a new cluster leader.
Most of these problems can be solved by following the steps outlined in our
[Disaster recovery for Consul clusters](/consul/tutorials/datacenter-operations/recovery-outage) document.