Issue
Description
Occasionally you would like to have the roles you have available on your source instance on your target instance. This article describes a few options to do just that.
NOTE:
Data preservers are primarily intended to preserve system settings and themes, such as instance-specific authentication settings. Do not use data preservers to transfer large sets of data, such as user groups. If you must preserve table data such as users, groups, and roles, consider exporting the records to a file and importing it after the clone is complete. More information can be found in our documentation topic: Data preservation on cloning target instances.
Procedure
Test Case
Preserve the ‘itil’ role when cloning. This is the link to the ‘itil’ role:
/nav_to.do?uri=sys_user_role.do?sys_id=282bf1fac6112285017366cb5f867469
OPTION 1: On target clone instance, export data from various tables to .xml, perform clone, then import all .xmls back onto the target clone instance. You can use these links:
- /sys_user_role_list.do?sysparm_query=name%3Ditil
- /sys_user_has_role_list.do?sysparm_query=role%3D282bf1fac6112285017366cb5f867469%5E
- /sys_user_role_contains_list.do?sysparm_query=contains%3D282bf1fac6112285017366cb5f867469%5E
NOTE: Depending on the testing being performed and customizations to roles and ACLs, these tables will likely be optional:
- /sys_app_application_list.do?sysparm_query=roles%3Ditil
- /sys_app_module_list.do?sysparm_query=roles%3Ditil
- /sys_security_acl_role_list.do?sysparm_query=sys_user_role%3D282bf1fac6112285017366cb5f867469%5E
- /pa_dashboards_permissions_list.do?sysparm_query=role%3D282bf1fac6112285017366cb5f867469%5E
- /sys_embedded_help_role_list.do?sysparm_query=role%3D282bf1fac6112285017366cb5f867469%5E
- /sys_group_has_role_list.do?sysparm_query=role%3D282bf1fac6112285017366cb5f867469%5E
- /sys_ui_action_role_list.do?sysparm_query=sys_user_role%3D282bf1fac6112285017366cb5f867469%5E
OPTION 2: Create table exclusions and data preservers.
On the source clone instance, create data preservers (see the documentation topic in the "Note" above).
You can know request a clone. The final result will be all roles were cloned over to the target clone instance. However, the ‘itil’ role on the target instance remains the same.
Applicable Versions
All
Additional Information
Depending on the size of a database, this can cause clone performance issues and lead to the clone process to fail completely.
KB0717012 - Clone results based on Exclusion and Preserver configuration
KB0716394 - Preserve the Users [sys_user] table when cloning