Feature Server data recovery
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
The Order is Crucial
FIRST: 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: Run the Cassandra cleanup script. This step is the real "meat" of the Backend Recovery Procedure; it forces Feature Server to perform an initial import at the next start. How? 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.
LAST: 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.
IMPORTANT
|
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.
To run each of the following scripts, type the command:
java -jar <jython-version>.jar scriptname.py script input parameters
See Python Scripts 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 |
command example:
java -jar <jython-version>.jar saveUserRoles.py -H localhost -p 9160 -o savedUserRoles.csv
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 |
command example:
java -jar <jython-version>.jar saveUserVmProfiles.py -H localhost -p 9160 -o savedUserVmProfiles.csv
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 |
command example:
java -jar <jython-version>.jar saveUsergroupVmProfiles.py -H localhost -p 9160 -o savedUsergroupVmProfiles.csv
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 |
command example:
java -jar <jython-version>.jar saveUserCallingProfiles.py -H localhost -p 9160 -o savedUserCallingProfiles.csv
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 |
command example:
java -jar <jython-version>.jar saveDeviceCallingProfiles.py -H localhost -p 9160 -o savedDeviceCallingProfiles.csv
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.
- command example:
- java -jar <jython-version>.jar cleanupColumnFamilies.py -H localhost -p 9160 -o truncatedCFs.log
- Perform the keyspace flush operation using nodetool (see Backing up Cassandra data).
Restoration
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.
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.
Restoring data not stored in Configuration Server
The scripts below restore the data saved by the backup scripts (see Backing up data not stored in Configuration Server).
Run the scripts, using the following example commands as models for the restore commands:
java -jar <jython-version>.jar restoreUserRoles.py -H localhost -p 9160 -i savedUserRoles.csv -o restoredUserRoles.log
java -jar <jython-version>.jar restoreUserVmProfiles.py -H localhost -p 9160 -i savedUserVmProfiles.csv -o restoredUserVmProfiles.log
java -jar <jython-version>.jar restoreUsergroupVmProfiles.py -H localhost -p 9160 -i savedUsergroupVmProfiles.csv -o restoredUsergroupVmProfiles.log
java -jar <jython-version>.jar restoreUserCallingProfiles.py -H localhost -p 9160 -i savedUserCallingProfiles.csv -o restoredUserCallingProfiles.log
java -jar <jython-version>.jar restoreDeviceCallingProfiles.py -H localhost -p 9160 -i savedDeviceCallingProfiles.csv -o restoredDeviceCallingProfiles.log
Note that the time consumed by the restoration process depends upon the amount of data available in the Cassandra database. A single object restoration takes approximately 1-2 seconds.