You can failback to a restored data center's primary node from a failover.

Note: The Service Center may be unavailable for some steps during this process, make sure that you schedule the work at an appropriate time.

Procedure

  1. Stop the dtService on all appliances that belong to the organization, across all data centers:
    service dtService stop
  2. Back up the fabric database from the current primary node:
    /usr/local/desktone/scripts/backupdb.sh –P <’database password’>

    This creates a file called <hostname>.<timestamp>.tar.gz in the /usr/local/desktone/backup folder.

  3. SCP the backup file to the original primary node.
  4. Extract the backup file:
    tar –zxvf <hostname>.<timestamp>.tar.gz
  5. Restore the backup on this original primary node.
    Note: Do this once for each database type. This means you will do this twice for tenant appliances, the first time should be for the fdb, and the second time should be for the edb.
    env PGPASSWORD=<pswd> /usr/local/pgsql/bin/pg_restore –i –w –U admin –d <ft> -v --clean <fn>

    where:

    • <pswd> = database password
    • <ft> = FDB (done for each for tenant appliances, or just once for service provider appliances)
    • <fn> = the path to the extracted file with respect to the <ft> parameter
  6. Open a psql session to the fabric database on all service provider appliances:
    psql –U admin fdb
  7. Purge the _slony schema for all databases (primary and secondary):
    drop schema _slony cascade;
  8. Exit from the psql session:
    \q
  9. If you are restoring service provider appliances, start the dtService on the original primary database appliance (do not do this for tenant appliances):
    service dtService start
  10. In the Service Center, select appliances > maintenance.
  11. In the Slony Operations section of the page, use the Organization id drop-down menu to select the Org ID of the appliance to which the init slony will be performed.
    The DB instance name menu appears.
  12. Use the DB instance name menu to select the name of the database instance (Fabric, Element, or Appvolumes) for init slony.
    If you selected Element or Appvolumes, the Element ID menu appears.
  13. If you selected Element or Appvolumes above, use the Element ID drop-down menu to select the ID of the Desktop Manager to list as New Master IP for the init slony operation. If you selected Fabric above, skip this step.
  14. Click Init Slony.
    Note: When you reinitialize slony for the edb, you must reinitialize slony for the avdb as well.
  15. Start dtService on all remaining appliances (including the primary for a tenant restore):
    service dtService start