Restore a component to an existing environment

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

  1. Remove old ZooKeeper directories:
    /opt/apigee/data/apigee-zookeeper
    /opt/apigee/etc/apigee-zookeeper.d
  2. 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
  3. Restart all components to establish synchronization with the new restored ZooKeeper.

Restore one cluster node

  1. 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

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

Apache Cassandra

Restore one standalone node

  1. Remove old Cassandra directory:
    /opt/apigee/data/apigee-cassandra
  2. 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
  3. Restart all components.

Restore one cluster node

  1. 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 [-u username -pw password] -h localhost repair -pr

    You only need to pass your username and password if you enabled JMX authentication for Cassandra.

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:
    /opt/apigee/apigee-service/bin/apigee-service edge-management-server stop
    /opt/apigee/apigee-service/bin/apigee-service apigee-sso stop
    /opt/apigee/apigee-service/bin/apigee-service edge-qpid-server stop
    /opt/apigee/apigee-service/bin/apigee-service edge-postgres-server stop
  2. Make sure PostgreSQL database is running:
    /opt/apigee/apigee-service/bin/apigee-service apigee-postgresql status
  3. Restore PostgreSQL database from the backup file:
    /opt/apigee/apigee-service/bin/apigee-service apigee-postgresql restore 2016.03.17,14.40.41.dump
  4. 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 apigee-sso 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

  1. 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
  2. Start PostgreSQL:
    /opt/apigee/apigee-service/bin/apigee-service apigee-postgresql start

Postgres Server

  1. Remove old Postgres Server directories:
    /opt/apigee/data/edge-postgres-server
    /opt/apigee/etc/edge-postgres-server.d
  2. 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
  3. Start Postgres Server:
    /opt/apigee/apigee-service/bin/apigee-service edge-postgres-server start 

Qpidd database

  1. Remove old Qpidd directories:
    /opt/apigee/data/apigee-qpidd
    /opt/apigee/etc/apigee-qpidd.d
  2. Restore Qpidd:
    /opt/apigee/apigee-service/bin/apigee-service apigee-qpidd restore backup-2016.03.17,14.40.41.tar.gz 
  3. Start Qpidd:
    /opt/apigee/apigee-service/bin/apigee-service apigee-qpidd start

Qpid Server

  1. Remove old Qpid Server directories:
    /opt/apigee/data/edge-qpid-server
    /opt/apigee/etc/edge-qpid-server.d
  2. 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
  3. Start Qpid Server:
    /opt/apigee/apigee-service/bin/apigee-service edge-qpid-server start

OpenLDAP

  1. Remove old OpenLDAP directories:
    /opt/apigee/data/apigee-openldap
    /opt/apigee/etc/apigee-openldap.d
  2. Restore OpenLDAP from the backup file:
    /opt/apigee/apigee-service/bin/apigee-service apigee-openldap restore 2016.03.17,14.40.41
  3. Restart OpenLDAP:
    /opt/apigee/apigee-service/bin/apigee-service apigee-openldap start

Management Server

  1. Remove old Management Server directories:
    /opt/apigee/data/edge-management-server
    /opt/apigee/etc/edge-management-server.d
  2. 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
  3. Restart the Management Server:
    /opt/apigee/apigee-service/bin/apigee-service edge-management-server start

Message Processor

  1. Remove old Message Processor directories:
    /opt/apigee/data/edge-message-processor
    /opt/apigee/etc/edge-message-processor.d
  2. 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
  3. Restart Message Processor:
    /opt/apigee/apigee-service/bin/apigee-service edge-message-processor start

Router

  1. Remove old Router directories:
    /opt/apigee/data/edge-router
    /opt/apigee/etc/edge-router.d
  2. 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
  3. Restart Router:
    /opt/apigee/apigee-service/bin/apigee-service edge-router start

Edge UI

  1. Remove old UI directories:
    /opt/apigee/data/edge-ui
    /opt/apigee/etc/edge-ui.d
  2. 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
  3. Restart UI:
    /opt/apigee/apigee-service/bin/apigee-service edge-ui start