> [!CAUTION]
> **Caution:** This documentation covers Edge for Private Cloud 4.16.05, which is no longer supported. Google does not provide security patches, bug fixes, or technical support for this version. The current supported version is 4.54.00. See the [Edge for Private Cloud documentation](https://docs.apigee.com/private-cloud/latest/overview) for the current version, or [All versions](https://docs.apigee.com/private-cloud/versions) to compare releases.

*Edge for Private Cloud v. 4.16.05*

This document covers re-installation and restoration of an Edge component. Use this procedure
if you have to re-install the Edge component before you restore the backup.

> [!NOTE]
> **Note:** These procedures all assume that you are re-installing the component onto a node with the same IP address or DNS name as the node that failed.

## Apache ZooKeeper

### Restore one standalone node

1. Stop ZooKeeper:   
   \> /\<inst_root\>/apigee/apigee-service/bin/apigee-service apigee-zookeeper stop
2. Remove old ZooKeeper directories:  
   /\<inst_root\>/apigee/data/apigee-zookeeper  
   /\<inst_root\>/apigee/etc/apigee-zookeeper.d
3. Re-install ZooKeeper:  
   \> /\<inst_root\>/apigee/apigee-service/bin/apigee-service apigee-zookeeper install
4. Restore ZooKeeper.  
   \> /\<inst_root\>/apigee/apigee-service/bin/apigee-service apigee-zookeeper restore backup-2016.03.17,14.40.41.tar.gz
5. Restart all components:  
   \> /\<inst_root\>/apigee/apigee-service/bin/apigee-all restart

### Restore one cluster node

If a single ZooKeeper node fails that is part of an ensemble, you can create a new node with
the same hostname/IP address and re-install ZooKeeper. When the new ZooKeeper node joins the
ZooKeeper ensemble it will get the latest snapshots from the Leader and start to serve clients.
You do not need to restore data in this instance.

1. Re-install ZooKeeper:  
   \> /\<inst_root\>/apigee/apigee-service/bin/apigee-service apigee-zookeeper install
2. Run setup on the ZooKeeper node using the same config file used when installing the original node:  
   \> /\<inst_root\>/apigee/apigee-service/bin/apigee-service apigee-zookeeper setup -f configFile
3. Start ZooKeeper:  
   \> /\<inst_root\>/apigee/apigee-service/bin/apigee-service apigee-zookeeper start

### Restore a complete cluster

1. Stop the complete cluster.
2. Restore all ZooKeeper nodes from the backup file as described above for a single node.
3. Start the ZooKeeper cluster.
4. Restart all components.

## Apache Cassandra

### Restore one standalone node

1. Stop Cassandra:   
   \> /\<inst_root\>/apigee/apigee-service/bin/apigee-service apigee-cassandra stop
2. Remove old Cassandra directories:  
   /\<inst_root\>/apigee/data/apigee-cassandra  
   /\<inst_root\>/apigee/etc/apigee-cassandra.d
3. Re-install Cassandra:  
   \> /\<inst_root\>/apigee/apigee-service/bin/apigee-service apigee-cassandra install
4. Restore Cassandra:  
   \> /\<inst_root\>/apigee/apigee-service/bin/apigee-service apigee-cassandra restore backup-2016.03.17,14.40.41.tar.gz
5. Restart all components:  
   \> /\<inst_root\>/apigee/apigee-service/bin/apigee-all restart

### Restore one cluster node

If a single Cassandra node fails, that is part of an ensemble, you can create a new node with
the same hostname/IP address. You only need to re-install Cassandra, you do not need to restore
the data.

Note: When performing a re-install on a non-seed node, ensure that at least one Cassandra seed
node is up.

1. Re-install Cassandra:  
   \> /\<inst_root\>/apigee/apigee-service/bin/apigee-service apigee-cassandra install
2. Run setup on the Cassandra node using the same config file used when installing the original node:  
   \> /\<inst_root\>/apigee/apigee-service/bin/apigee-service apigee-cassandra setup -f configFile
3. Start Cassandra:  
   \> /\<inst_root\>/apigee/apigee-service/bin/apigee-service apigee-cassandra start
4. After installing Cassandra, and the node is up, (given that RF\>=2 for all keyspaces) execute the following nodetool command to initialize the node:  
   \<inst_root\>/apigee/apigee-cassandra/bin/nodetool -h localhost repair

### Restore a complete cluster

1. Stop the complete cluster.
2. Restore all Cassandra nodes from the backup file.
3. Start the Cassandra cluster.
4. Restart all components.

## PostgreSQL database

### PosgreSQL running standalone or
as Master

1. Stop the Management Server, Qpid Server, and Postgres Server on all nodes:   
   **Note** : Your system can still handle requests to API proxies while these components are stopped.  
   \> /\<inst_root\>/apigee/apigee-service/bin/apigee-service edge-management-server stop  
   \> /\<inst_root\>/apigee/apigee-service/bin/apigee-service edge-qpid-server stop  
   \> /\<inst_root\>/apigee/apigee-service/bin/apigee-service edge-postgres-server stop
2. Re-install PostgreSQL database:  
   \> /\<inst_root\>/apigee/apigee-service/bin/apigee-service apigee-postgresql install
3. Start PostgreSQL:  
   \> /\<inst_root\>/apigee/apigee-service/bin/apigee-service apigee-postgresql start
4. Restore PostgreSQL database from the backup file:  
   /\<inst_root\>/apigee/apigee-service/bin/apigee-service apigee-postgresql restore 2016.03.17,14.40.41.dump
5. Start the Management Server, Qpid Server, and Postgres Server on all nodes:   
   \> /\<inst_root\>/apigee/apigee-service/bin/apigee-service edge-management-server start  
   \> /\<inst_root\>/apigee/apigee-service/bin/apigee-service edge-qpid-server start  
   \> /\<inst_root\>/apigee/apigee-service/bin/apigee-service edge-postgres-server start

### PosgreSQL running as Standby

1. Re-install PostgreSQL database:  
   \> /\<inst_root\>/apigee/apigee-service/bin/apigee-service apigee-postgresql install
2. Reconfigure PostgreSQL database using the same config file you used to install it:  
   /\<inst_root\>/apigee/apigee-service/bin/apigee-service apigee-postgresql setup -f configFile
3. Start PostgreSQL:  
   \> /\<inst_root\>/apigee/apigee-service/bin/apigee-service apigee-postgresql start

## Postgres Server

1. Stop Postgres Server on all master and standby nodes:  
   \> /\<inst_root\>/apigee/apigee-service/bin/apigee-service edge-postgres-server stop
2. Remove old Postgres Server directories:  
   /\<inst_root\>/apigee/data/edge-postgres-server  
   /\<inst_root\>/apigee/etc/edge-postgres-server.d
3. Re-install Postgres Server:  
   \> /\<inst_root\>/apigee/apigee-service/bin/apigee-service edge-postgres-server install
4. Restore Postgres Server from the backup file:  
   \> /\<inst_root\>/apigee/apigee-service/bin/apigee-service edge-postgres-server restore backup-2016.03.17,14.40.41.tar.gz
5. Start Postgres Server on all master and standby nodes:  
   \> /\<inst_root\>/apigee/apigee-service/bin/apigee-service edge-postgres-server start

## Qpid Server and Qpidd

1. Stop Qpidd, Qpid Server, and Postgres Server on all nodes:   
   \> /\<inst_root\>/apigee/apigee-service/bin/apigee-service edge-qpid-server stop  
   \> /\<inst_root\>/apigee/apigee-service/bin/apigee-service edge-postgres-server stop   
   \> /\<inst_root\>/apigee/apigee-service/bin/apigee-service apigee-qpidd stop
2. Remove old Qpid Server and Qpidd directories:  
   /\<inst_root\>/apigee/data/edge-qpid-server  
   /\<inst_root\>/apigee/etc/edge-qpid-server.d   
   /\<inst_root\>/apigee/data/apigee-qpidd   
   /\<inst_root\>/apigee/etc/apigee-qpidd.d
3. Re-install Qpidd:  
   \> /\<inst_root\>/apigee/apigee-service/bin/apigee-service apigee-qpidd install
4. Restore Qpidd:  
   \> /\<inst_root\>/apigee/apigee-service/bin/apigee-service apigee-qpidd restore backup-2016.03.17,14.40.41.tar.gz
5. Start Qpidd:  
   \> /\<inst_root\>/apigee/apigee-service/bin/apigee-service apigee-qpidd start
6. Re-install Qpid Server:  
   \> /\<inst_root\>/apigee/apigee-service/bin/apigee-service edge-qpid-server install
7. Restore Qpid Server:  
   \> /\<inst_root\>/apigee/apigee-service/bin/apigee-service edge-qpid-server restore backup-2016.03.17,14.40.41.tar.gz
8. Restart Qpid Server, Qpidd, and Postgres Servers on all nodes:   
   \> /\<inst_root\>/apigee/apigee-service/bin/apigee-service apigee-qpidd restart  
   \> /\<inst_root\>/apigee/apigee-service/bin/apigee-service edge-qpid-server restart  
   \> /\<inst_root\>/apigee/apigee-service/bin/apigee-service edge-postgres-server restart

## OpenLDAP

1. Stop OpenLDAP:   
   \> /\<inst_root\>/apigee/apigee-service/bin/apigee-service apigee-openldap stop
2. Re-install OpenLDAP:  
   \> /\<inst_root\>/apigee/apigee-service/bin/apigee-service apigee-openldap install
3. Remove old OpenLDAP directories:  
   /\<inst_root\>/apigee/data/apigee-openldap  
   /\<inst_root\>/apigee/etc/apigee-openldap.d
4. Restore OpenLDAP:  
   \> /\<inst_root\>/apigee/apigee-service/bin/apigee-service apigee-openldap restore backup-2016.03.17,14.40.41.tar.gz
5. Restart OpenLDAP:  
   \> /\<inst_root\>/apigee/apigee-service/bin/apigee-service apigee-openldap start
6. Restart all Management Servers:   
   \> /\<inst_root\>/apigee/apigee-service/bin/apigee-service edge-management-server restart

## Management Server

1. Stop Management Server:   
   \> /\<inst_root\>/apigee/apigee-service/bin/apigee-service edge-management-server stop
2. Remove old Management Server directories:  
   /\<inst_root\>/apigee/data/edge-management-server  
   /\<inst_root\>/apigee/etc/edge-management-server.d
3. Re-install Management Server:  
   \> /\<inst_root\>/apigee/apigee-service/bin/apigee-service edge-management-server install
4. Restore Management Server from the backup file:  
   \> /\<inst_root\>/apigee/apigee-service/bin/apigee-service edge-management-server restore backup-2016.03.17,14.40.41.tar.gz
5. Restart Management Server:  
   \> /\<inst_root\>/apigee/apigee-service/bin/apigee-service edge-management-server start

## Message Processor

1. Stop Message Processor:   
   \> /\<inst_root\>/apigee/apigee-service/bin/apigee-service edge-message-processor stop
2. Remove old Message Processor directories:  
   /\<inst_root\>/apigee/data/edge-message-processor  
   /\<inst_root\>/apigee/etc/edge-message-processor.d
3. Re-install Message Processor:  
   \> /\<inst_root\>/apigee/apigee-service/bin/apigee-service edge-message-processor install
4. Restore Message Processor from the backup file:  
   \> /\<inst_root\>/apigee/apigee-service/bin/apigee-service edge-message-processor restore backup-2016.03.17,14.40.41.tar.gz
5. Restart Message Processor:  
   \> /\<inst_root\>/apigee/apigee-service/bin/apigee-service edge-message-processor start

## Router

1. Stop Router:   
   \> /\<inst_root\>/apigee/apigee-service/bin/apigee-service edge-router stop
2. Remove old Router directories:  
   /\<inst_root\>/apigee/data/edge-router  
   /\<inst_root\>/apigee/etc/edge-router.d
3. Re-install Router:  
   \> /\<inst_root\>/apigee/apigee-service/bin/apigee-service edge-router install
4. Restore Router from the backup file:  
   \> /\<inst_root\>/apigee/apigee-service/bin/apigee-service edge-router restore backup-2016.03.17,14.40.41.tar.gz
5. Restart Router:  
   \> /\<inst_root\>/apigee/apigee-service/bin/apigee-service edge-router start

## Edge UI

1. Stop UI:   
   \> /\<inst_root\>/apigee/apigee-service/bin/apigee-service edge-ui stop
2. Remove old UI directories:  
   /\<inst_root\>/apigee/data/edge-ui  
   /\<inst_root\>/apigee/etc/edge-ui.d
3. Re-install UI:  
   \> /\<inst_root\>/apigee/apigee-service/bin/apigee-service edge-ui install
4. Restore UI from the backup file:  
   \> /\<inst_root\>/apigee/apigee-service/bin/apigee-service edge-ui restore backup-2016.03.17,14.40.41.tar.gz
5. Restart UI:  
   \> /\<inst_root\>/apigee/apigee-service/bin/apigee-service edge-ui start

## Complete Site Recovery

1. Stop all component nodes. Note that the order of stopping the subsystems is important - first all Edge nodes and then all datastores nodes.
2. Restore all components as described above.
3. Now start all components in the following order. Note that the order of starting the subsystems is important:
   1. Start the ZooKeeper cluster
   2. Start the Cassandra cluster
   3. Ensure that OpenLDAP is up and running
   4. Start qpid
   5. Ensure that the PostgreSQL database is up and running
   6. Start Management Server
   7. Start Routers and Message Processors
   8. Start Qpid Server
   9. Start Postgres Server
   10. Start Apigee UI