Edge for Private Cloud v. 4.17.01
This document covers restoration of any Edge component to an existing environment without having to re-install the component. This means the node where you are restoring the component has the same IP address or DNS name as when you performed the backup.
If you have to re-install the component see How to Reinstall and Restore Components.
Apache ZooKeeper
Restore one standalone node
- Remove old ZooKeeper directories:
/opt/apigee/data/apigee-zookeeper
/opt/apigee/etc/apigee-zookeeper.d - Restore ZooKeeper data from the backup file:
> /opt/apigee/apigee-service/bin/apigee-service apigee-zookeeper restore backup-2016.03.17,14.40.41.tar.gz - Restart all components to establish synchronization with the new restored ZooKeeper.
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 (follow the re-install steps mentioned in How to Reinstall and Restore Components) and when it 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.
Restore a complete cluster
- Stop the complete cluster.
- Restore all ZooKeeper nodes from the backup file.
- Start the ZooKeeper cluster.
- Restart all components.
Apache Cassandra
Restore one standalone node
- Remove old Cassandra directories:
/opt/apigee/data/apigee-cassandra
/opt/apigee/etc/apigee-cassandra.d - Restore the Cassandra node from the backup file:
/opt/apigee/apigee-service/bin/apigee-service apigee-cassandra restore backup-2016.03.17,14.40.41.tar.gz - Restart all components.
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 (follow the re-install steps mentioned in How to Reinstall and Restore Components). You
only need to re-install Cassandra, you do not need to restore the data.
When performing a restore on a non-seed node, ensure that at least one Cassandra seed node is up.
After installing Cassandra, and the node is up, (given that RF>=2 for all keyspaces) execute the following nodetool command to initialize the node:
opt/apigee/apigee-cassandra/bin/nodetool -h localhost repair
Restore a complete cluster
- Stop the complete cluster.
- Restore all Cassandra nodes from the backup file.
- Start the Cassandra cluster.
- Restart all components.
PostgreSQL database
PosgreSQL running standalone or as Master
- 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.
> /opt/apigee/apigee-service/bin/apigee-service edge-management-server stop
> /opt/apigee/apigee-service/bin/apigee-service edge-qpid-server stop
> /opt/apigee/apigee-service/bin/apigee-service edge-postgres-server stop - Make sure PostgreSQL database is running:
> /opt/apigee/apigee-service/bin/apigee-service apigee-postgresql status - Restore PostgreSQL database from the backup file:
/opt/apigee/apigee-service/bin/apigee-service apigee-postgresql restore 2016.03.17,14.40.41.dump - Start the Management Server, Qpid Server, and Postgres Server on all
nodes:
> /opt/apigee/apigee-service/bin/apigee-service edge-management-server start
> /opt/apigee/apigee-service/bin/apigee-service edge-qpid-server start
> /opt/apigee/apigee-service/bin/apigee-service edge-postgres-server start
PosgreSQL running as Standby
- Reconfigure PostgreSQL database using the same config file you used to install it:
/opt/apigee/apigee-service/bin/apigee-service apigee-postgresql setup -f configFile - Start PostgreSQL:
> /opt/apigee/apigee-service/bin/apigee-service apigee-postgresql start
Postgres Server
- Remove old Postgres Server directories:
/opt/apigee/data/edge-postgres-server
/opt/apigee/etc/edge-postgres-server.d - Restore Postgres Server from the backup file:
> /opt/apigee/apigee-service/bin/apigee-service edge-postgres-server restore backup-2016.03.17,14.40.41.tar.gz - Start Postgres Server:
> /opt/apigee/apigee-service/bin/apigee-service edge-postgres-server start
Qpidd database
- Remove old Qpidd directories:
/opt/apigee/data/apigee-qpidd
/opt/apigee/etc/apigee-qpidd.d - Restore Qpidd:
> /opt/apigee/apigee-service/bin/apigee-service apigee-qpidd restore backup-2016.03.17,14.40.41.tar.gz - Start Qpidd:
> /opt/apigee/apigee-service/bin/apigee-service apigee-qpidd start
Qpid Server
- Remove old Qpid Server directories:
/opt/apigee/data/edge-qpid-server
/opt/apigee/etc/edge-qpid-server.d - Restore Qpid Server from the backup file:
> /opt/apigee/apigee-service/bin/apigee-service edge-qpid-server restore backup-2016.03.17,14.40.41.tar.gz - Start Qpid Server:
> /opt/apigee/apigee-service/bin/apigee-service edge-qpid-server start
OpenLDAP
- Remove old OpenLDAP directories:
/opt/apigee/data/apigee-openldap
/opt/apigee/etc/apigee-openldap.d - Restore OpenLDAP from the backup file:
> /opt/apigee/apigee-service/bin/apigee-service apigee-openldap restore backup-2016.03.17,14.40.41.tar.gz - Restart OpenLDAP:
> /opt/apigee/apigee-service/bin/apigee-service apigee-openldap start
Management Server
- Remove old Management Server directories:
/opt/apigee/data/edge-management-server
/opt/apigee/etc/edge-management-server.d - Restore Management Server from the backup file:
> /opt/apigee/apigee-service/bin/apigee-service edge-management-server restore backup-2016.03.17,14.40.41.tar.gz - Restart the Management Server:
> /opt/apigee/apigee-service/bin/apigee-service edge-management-server start
Message Processor
- Remove old Message Processor directories:
/opt/apigee/data/edge-message-processor
/opt/apigee/etc/edge-message-processor.d - Restore Message Processor from the backup file:
> /opt/apigee/apigee-service/bin/apigee-service edge-message-processor restore backup-2016.03.17,14.40.41.tar.gz - Restart Message Processor:
> /opt/apigee/apigee-service/bin/apigee-service edge-message-processor start
Router
- Remove old Router directories:
/opt/apigee/data/edge-router
/opt/apigee/etc/edge-router.d - Restore Router from the backup file:
> /opt/apigee/apigee-service/bin/apigee-service edge-router restore backup-2016.03.17,14.40.41.tar.gz - Restart Router:
> /opt/apigee/apigee-service/bin/apigee-service edge-router start
Edge UI
- Remove old UI directories:
/opt/apigee/data/edge-ui
/opt/apigee/etc/edge-ui.d - Restore UI from the backup file:
> /opt/apigee/apigee-service/bin/apigee-service edge-ui restore backup-2016.03.17,14.40.41.tar.gz - Restart UI:
> /opt/apigee/apigee-service/bin/apigee-service edge-ui start