Re-initialize Feature Server backend
This procedure enables you to recover from configuration data corruption by exporting configuration data to csv files, clearing the corrupted data from the Cassandra database, and then reimporting the data. The import process cleans the corrupt data.
Summary
"in some cases you may want to re-populate data in Cassandra used by your Feature Server either because it get corrupted , out of sync or you want to migrate/create another environmnet. Procedure , discussed below, does not guarantee exact replication and not intended to replace standard Cassandra backup and recovery. These steps can help you to refresh provisioning data maintained by Feature Server and review , adjust and re-populate feature server -specific data (such as voicemails and dialplan settings). Nore: This procedure may result in data loss and if you plan to re-populate the same backend , it is recommended to have Cassandra level backup before you proceed. You can execute some of below steps separately if you want to export some data or planning to re-synchronize only configuration-related content.
Note: if you pan to execute export and cleanup steps , make sure Feature Server is placed in Read Only mode using respective configuration option before proceeding. You should revert it back to to full operational mode ahead of restart that is needed to begin configuration syncronization steps
High level plan:
EXPORT: Run scripts that export User Roles, User Voicemail Profile assignments, User Group Voicemail Profile Assignments, User Calling Profile Assignments and Device Calling Profile Assignments first.
CLEANUP and RE-SYNC: Run the Cassandra cleanup script. It forces Feature Server to perform an initial import at the next start. The script truncates ALL configuration data in the Cassandra database that was previously sourced from Configuration Server during initial import and by processing real-tile updates received. Note: The Cassandra cleanup script also removes data that you want to keep such as User roles and User associations with Calling and Voicemail profiles, as well as User and User Group settings such as e-mail notification settings and Dial Plan Forwarding settings. All that activity is why you must export first and then restore last each of those data sets: to preserve the data. You must restart Feature Server and wait for it to complete initialize.
RE-IMPORT: Run scripts that restore User Roles, User Voicemail Profile assignments, User Group Voicemail Profile Assignments, User Calling Profile Assignments and Device Calling Profile Assignments after the Cassandra cleanup script.
Exporting data not stored in Configuration Server
Exporting Feature Server data not stored in Configuration Server requires script deployment and execution, followed by a Cassandra cleanup procedure.
The following Python scripts save data, such as User roles, User Voicemail Profiles assignment, and User Group Voicemail Profiles assignment, that is not related to or synchronized with Configuration Server.
Each script creates a csv file that you can analyze, edit as needed, and use as the input data for the scripts restoring the data not contained in Configuration Server.
See Appendix: Feature Server Maintenance Python Scripts for Embedded Cassandra for information on how to deploy and run the script.
User Feature Server Roles
The User Feature Server Roles script creates a csv file containing records for all users with Roles different from the default User role. The csv file later serves as the input for the Restoring User Roles procedure.
Every record of the user roles csv file contains user name, user ID, and the corresponding set of roles assigned to the user. User ID consists of the corresponding person DBID and Configuration Server GUID separated by ‘@’; for instance: 57426@dcc7a7ac-626a-40c7-b805-e14b71d438d9
csv file content example:
| User name | User ID | Assigned roles |
|---|---|---|
| un00001 | 57426@dcc7a7ac-626a-40c7-b805-e14b71d438d9 | User,Administrator,GroupMailboxAdministrator |
| un00003 | 57428@dcc7a7ac-626a-40c7-b805-e14b71d438d9 | User,GroupMailboxAdministrator |
| un00002 | 57427@dcc7a7ac-626a-40c7-b805-e14b71d438d9 | User,GroupMailboxAdministrator |
For more information on usage of the saveUserRoles.py script, see Python Scripts.
User Voicemail Profile Assignments
The User Voicemail Profile Assignments script creates a csv file containing records for all users with a Voicemail Profile other than the one assigned to them by System Profile. The csv file later serves as the input for the Restoring User Voicemail Profile Assignments procedure.
Every record of the user voicemail profile csv file contains a user name, user ID, and the corresponding ID of a Voicemail Profile assigned to the user. User ID consists of the corresponding person DBID and Configuration Server GUID separated by ‘@’; for instance: 57426@cb2fdedd-a57f-49e6-a54d-3f930eb1dfc5
csv file content example:
| User name | User ID | Voicemail Profile ID |
|---|---|---|
| un00002 | 57427@dcc7a7ac-626a-40c7-b805-e14b71d438d9 | 11451ec2-d68a-4425-98eb-fbf22a24fc7a |
| un00001 | 57426@dcc7a7ac-626a-40c7-b805-e14b71d438d9 | 92a5fd17-2b4b-493d-8727-004625e0a112 |
| un00001 | 57426@f521b229-f599-47d4-81fd-2fbf15b02809 | 11451ec2-d68a-4425-98eb-fbf22a24fc7a |
| un00003 | 57428@f521b229-f599-47d4-81fd-2fbf15b02809 | 92a5fd17-2b4b-493d-8727-004625e0a112 |
For more information on usage of the saveUserVmProfiles.py script, see Python Scripts.
User Group Voicemail Profile Assignments
The User Group Voicemail Profile Assignments script creates a csv file containing records for all user groups with a Voicemail Profile other than the one assigned to them by System Profile. The csv file later serves as the input for the Restoring User Group Voicemail Profile Assignments procedure.
Every record of the user group voicemail profile csv file contains a group name, group ID and corresponding ID of a Voicemail Profile assigned to the user group. User group ID consists of the corresponding Agent Group DBID and Configuration Server GUID separated by ‘@’; for instance: 19613@dcc7a7ac-626a-40c7-b805-e14b71d438d9
csv file content example:
| Group name | Group ID | Voicemail Profile ID |
|---|---|---|
| ag002 | 19613@dcc7a7ac-626a-40c7-b805-e14b71d438d9 | 92a5fd17-2b4b-493d-8727-004625e0a112 |
| ag002 | 19613@f521b229-f599-47d4-81fd-2fbf15b02809 | 11451ec2-d68a-4425-98eb-fbf22a24fc7a |
| ag001 | 19612@f521b229-f599-47d4-81fd-2fbf15b02809 | 92a5fd17-2b4b-493d-8727-004625e0a112 |
For more information on usage of the saveUsergroupVmProfiles.py script, see Python Scripts.
User Calling Profile Assignments
The User Calling Profile Assignments script creates a csv file containing records for all users with a Calling Profile assigned to them. The csv file later serves as the input for the Restoring User Calling Profile Assignments procedure.
Every record of the user calling profile csv file contains a user name, user ID, and the corresponding ID of a Calling Profile assigned to the user. User ID consists of the corresponding person DBID and Configuration Server GUID separated by ‘@’; for instance: 57426@dcc7a7ac-626a-40c7-b805-e14b71d438d9
csv file content example:
| User name | User ID | Calling Profile ID |
|---|---|---|
| un00002 | 57427@dcc7a7ac-626a-40c7-b805-e14b71d438d9 | 0758d5a6-355a-4e13-9ef2-63884f88a99c |
| un00001 | 57426@dcc7a7ac-626a-40c7-b805-e14b71d438d9 | e969a3be-6337-4041-8a9c-a270843c6529 |
For more information on usage of the saveUserCallingProfiles.py script, see Python Scripts.
Device Calling Profile Assignments
The Device Calling Profile Assignments script creates a csv file containing records for all devices with a Calling Profile assigned to them. The csv file later serves as the input for the Restoring Device Calling Profile Assignments procedure.
Every record of the device calling profile csv file contains a device ID and the corresponding ID of a Calling Profile assigned to the device. Device ID consists of corresponding DN number and the switch name the device belongs to, separated by ‘@’; for instance: 10001@SwitchSA01.
csv file content example:
| Device ID | Calling Profile ID |
|---|---|
| 20001@SwitchSA02 | 24e06da6-1dd3-479a-a0a2-0db2c9aa767c |
| 10001@SwitchSA01 | a4ea866b-7dcc-4da6-97ae-24cb14f2e150 |
For more information on usage of the saveDeviceCallingProfiles.py script, see Python Scripts.
Cassandra cleanup
Cassandra cleanup is a prerequisite for Configuration Server data reimport. Without the cleanup no reimport occurs.
The Cassandra cleanup procedure consists of the following steps:
- On the master Feature Server node, run the python script preparing Feature Server for synchronization with Configuration Server. The script truncates the Configuration Database synchronization-related column families to enable Configuration Server data reimport later.
- For more information on usage of the cleanupColumnFamilies.py script, see Python Scripts.
- Perform the keyspace flush operation using nodetool (see Backing up Cassandra data).
Reimporting Configuration Data
Feature Server will automatically do full re-import all configuration data upon startup when it detects that Cassandra database has been truncated.
Configuration Server data reimport
- Stop and restart the master Feature Server node. When the master node starts it imports switch objects (DNs and Agent Logins) and tenant objects (Persons, Agent Groups, and Places).
- Stop and restart all the other Feature Server nodes, one server at a time. Start each Feature Server only after the previous node has finished starting. Each Feature Server node imports the switch objects (DNs and Agent Logins) assigned to it.
If you want to perform synchronization without forcing full fill reload (for example, to catch up with events missed during prolonged Feature Server outage), you can do so without doing full cleanup of database by following these steps:
Point your browser to this URL on the master Feature Server: http://<fsserverhost>:<port>/fs/api/admin/reimport/init
Log in using your administrative credentials to initiate the reimport process.
To monitor progress point your browser to this URL on the master Feature Server: http://<fsserverhost>:<port>/fs/api/admin/reimport/state and, after logging in in using your administrative credentials, display the current Reimport state, which can be one of these two:
In progress Ready to start
reimport considered completed when status returns back to ready to start
Note: Feature server is expected to to incremental re-sync of cvonfiguration data automatically to recover from syn issues when you have option [cluster] reimport-on-conf-history-log-error to true in the master Feature Server application.
Importing back Feature Server specific data
To restore Feature Server data, you reimport data from Configuration Server, then run the scripts that restore the non-Configuration Server data that you saved by running the backup scripts above.
Run the scripts that restore the non-Configuration Server specific data that you saved by running the backup scripts above.
Restoring data not stored in Configuration Server
Run scripts restoreUserRoles.py, restoreUserVmProfiles.py, restoreUsergroupVmProfiles.py, restoreUserCallingProfiles.py, and restoreDeviceCallingProfiles.py using output files created by export files as discussed in previous chapter. For more information on usage of each of those scripts, see Python Scripts.
