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.
- Stop the dtService on all appliances that belong to the organization, across all data centers:
service dtService stop
- 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.
- SCP the backup file to the original primary node.
- Extract the backup file:
tar –zxvf <hostname>.<timestamp>.tar.gz
- 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>
- <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
- Open a psql session to the fabric database on all service provider appliances:
psql –U admin fdb
- Purge the _slony schema for all databases (primary and secondary):
drop schema _slony cascade;
- Exit from the psql session:
- 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
- In the Service Center, select appliances > maintenance.
- 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.
- 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.
- 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.
- Click Init Slony.
Note: When you reinitialize slony for the edb, you must reinitialize slony for the avdb as well.
- Start dtService on all remaining appliances (including the primary for a tenant restore):
service dtService start