If your designated primary Appliance Database fails, implement a failover to the designated replica database on the secondary appliance to maintain system operation.

About this task


Configure the Appliance Database as applicable for your system configuration. See Configure the vRealize Automation Appliance Database.


  1. If possible, log in to the appliance hosting the primary Appliance Database as root using SSH.

    If the appliance or its host machine is not running, skip to step 3.

  2. Stop the vpostgres service using the service postgres stop command.
    # service postgres stop
    Stopping Vmware vPostgres: Last login: Mon Apr 27 19:49:26 UTC 2015 on pts/0
  3. Promote the replica database on the secondary appliance to be the primary database.
    1. Log in the secondary appliance as root using SSH.
    2. Promote the replica database to master as the postrgres user using the /opt/vmware/vpostgres/current/share/promote_replica_to_primary command.
      # su - postgres
      server promoting
  4. Configure the database virtual IP for the new Appliance Database configuration.

    VIP Configuration Option


    If you are using a DNS entry for the Appliance Database, change the DNS entry point as appropriate for your system.

    1. Modify the IP of the DNS entry to point at the new primary appliance.

    2. Log in to each vRealize Appliance as root and execute a service network restart.

    If you configured a virtual IP for the Appliance Database, edit the pool that you created containing the two vRealize Automation appliances as nodes.

    1. Disable the old primary node.

    2. Enable the new primary node.

  5. Rebuild the replica database on the original primary Appliance Database host machine.
    1. Log in to the appliance as root using SSH.
    2. Configure database replication as the postrgres user using the ./run_as_replica-h primary appliance -b-W-U replicate command.
      # su -postgres
      /opt/vmware/vpostgres/current/share/run_as_replica -h appl.domain.local -b -W -U replicate
    3. Enter the replicate user password when prompted.
    4. Type yes in response to the following message.

      "WARNING: the base backup operation will replace the current contents of the data directory. Please confirm by typing yes."

What to do next

Validate that the replication was successful. See Validate Appliance Database Replication.