ServiceNow: Using the Clone Data Preserver
In some cases, you may want to clone your ServiceNow production data to a developer instance. While there can be many reasons to do so, problems with the PagerDuty integration can occur if the data is cloned without using a Clone Data Preserver. Please use this guide to address common issues that may arise when replicating a ServiceNow environment.
What is the Clone Data Preserver?
The Clone Data Preserver is a ServiceNow feature that defines what data should not be replaced when cloning one environment into another.
Why Should I Use This?
When you clone your environment, you also clone the PagerDuty integration. When this happens you will lose PagerDuty configuration in the target destination, such as Configuration Item and assignment group mappings, service IDs, and API keys. To clone the PagerDuty integration in a way that it remains functional, you can use the Clone Data Preserver to preserve specified PagerDuty fields.
The steps below outline how to use Clone Data Preservers so that information in an example production environment will appear in a developer instance.
Required Permissions
In order to use the Clone Data Preserver feature, your ServiceNow role must include
clone_admin
oradmin
.
Create Clone Data Preservers
There are two ways to create Clone Data Preservers:
Create Clone Data Preservers by Importing an Update Set
As an alternative to creating the Clone Data Preservers manually, you can import an update set on the source ServiceNow instance. In keeping with our prod to dev example, you would import the appropriate update set onto your prod instance before cloning to your new dev instance.
This update set will work for the v5 and v6 versions of the PagerDuty integration. Note that this update set only preserves the PagerDuty Settings configuration. To preserve the mappings for users, assignment groups and Configuration Items, a ServiceNow administrator can follow the instructions to manually preserve those records.
Create Clone Data Preservers Manually
Following this process, you will make Clone Data Preservers for the four following tables:
Each step will prompt you to enter a name for the Clone Data Preserver. We recommend entering a descriptive name for your own reference later, for example “PagerDuty for New Dev Env” or “Preserve User Mappings”.
System Property Table
To begin, we'll address PagerDuty fields in the System Property table (sys_properties
).
- Navigate to System Clone Preserve Data, and select New.
- Create a new record for the Clone Data Preserver and select the table System Property [sys_properties].
- Create
OR
conditions for the following Names.- Name Is
x_pd_integration.default_user
OR
- Name Is
x_pd_integration.instance_url
OR
- Name Is
x_pd_integration.sn2pd_mapping
OR
- Name Is
x_pd_integration.default_service
OR
- Name Is
x_pd_integration.api_key
OR
- Name Is
x_pd_integration.webhook_restapi
OR
- Name Is
x_pd_integration.sn_auth_user
OR
- Name Is
x_pd_integration.sn_auth_userpwd
- Name Is
- Click Submit.
![System Property [sys_properties] Table 2162](https://files.readme.io/903b701-Clone_Data_Preserver.png)
System Property [sys_properties] Table
User Table
Next, create a Clone Data Preserver for the sys_user
table.
- Navigate to System Clone Preserve Data, and select New.
- Create a new record for the Clone Data Preserver and select the table User [sys_user].
- Create a filter with the following condition:
- PagerDuty ID
is not empty
- PagerDuty ID
- Click Submit.
![User [sys_user] Table 2802](https://files.readme.io/22badca-CDP-User-Mapping.png)
User [sys_user] Table
Group Table
Thirdly, create a Clone Data Preserver for the sys_user_group
table.
- Navigate to System Clone Preserve Data, and select New.
- Create a new record for the Clone Data Preserver and select the Group [sys_user_group] table.
- Create filters with the following conditions:
- PagerDuty escalation
is not empty
OR
- PagerDuty schedule
is not empty
OR
- PagerDuty service
is not empty
OR
- PagerDuty team
is not empty
OR
- PagerDuty webhook
is not empty
OR
- PagerDuty escalation
- Click Submit.
![Group [sys_user_group] Table 2800](https://files.readme.io/3939763-CDP-AG-Mappings.png)
Group [sys_user_group] Table
Configuration Item Table
Lastly, create a Clone Data Preserver for the cmdb_ci
table.
- Navigate to System Clone Preserve Data, and select New.
- Create a new record for the Clone Data Preserver and select the Configuration Item [cmdb_ci] table.
- Create filters with the following conditions:
- PagerDuty service
is not empty
OR
- PagerDuty webhook
is not empty
- PagerDuty service
- Click Submit.
![Configuration Item [cmdb_ci] Table 2806](https://files.readme.io/e3eac54-CDP-CI-Mappings.png)
Configuration Item [cmdb_ci] Table
Note: The Clone Data Preservers for user, assignment group and Configuration Item table will preserve the entire record in the target instance, not just PagerDuty ID values. Additionally, these filter conditions given in this guide are tailored for the out-of-box integration. If you’ve implemented any customizations, you may need to alter your queries for each Clone Data Preserver.
Updated 10 months ago