# Rollback on error

> :::note
Reverting to the previous version may be needed in the following scenarios:

:::note
Reverting to the previous version may be needed in the following scenarios:

* There is failure during upgrade, which is beyond recovery;
* There is an accidental data loss or corruption;
* Upgraded cluster is unusable.
:::

To roll back to a previous version, take the following steps:

1. Make a copy of `cluster_config.json`.
2. Verify that the etcd backup data is present on the primary server at the following location: `/mnt/backup/backup/<etcdBackupPath>/<node-name>/snapshots`.
   * `etcdBackupPath` – the same as the one specified in `backup.json` while enabling the backup.
   * `node-name` – the hostname of the server node.
3. To check the `backupstore` volume backup directory, run the following command:

   ```
   ls /mnt/backup/backupstore
   ```
4. Uninstall AI Center on all the nodes.
5. Now restore to the previous version of AI Center. Make sure to follow the **Backing up and restoring the cluster** documentation available for that specific version.
6. Once the restore is complete, make sure you disable the maintenance mode:

   ```
   /path/to/old-installer/configureUiPathAS.sh disable-maintenance-mode
   ```
7. Verify that maintenance mode is disabled by executing the following command:

   ```
   /path/to/old-installer/configureUiPathAS.sh is-maintenance-enabled
   ```
8. During the upgrade, scheduled backups were disabled on the primary node. To enable them again, run the following command:

   ```
   /path/to/old-installer/configureUiPathAS.sh resume-scheduled-backups
   ```
