ServiceNow Instance Cloning: A Beginner’s Guide
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
2 hours ago
1. What is instance cloning?
Instance cloning in ServiceNow is the process of copying data and configuration from one ServiceNow instance to another.
Why Do We Clone ? PROD to TEST
Suppose a company has three ServiceNow instances: DEV, TEST, and PROD.
Developers make configurations and develop new functionality in the DEV instance. Once the development is complete, they move the changes to the TEST instance to verify that everything works as expected. If testing is successful, the approved changes are moved to the PROD instance.
To test the changes in an environment that closely resembles production, the TEST instance should have similar data and configuration to PROD.
Therefore, we clone the PROD instance into TEST. This refreshes TEST with production data and configuration, subject to the clone settings, and helps identify potential issues before deploying changes to PROD.
2.Important cloning terminology
Example: If you want to clone PROD to DEV:
- Source instance: PROD
- Target instance: DEV
The direction matters: PROD → DEV means PROD is copied into DEV
|
Term |
Meaning |
|
Source instance |
The instance from which data and configuration are copied, such as PROD. |
|
Target instance |
The instance that receives the copied data and configuration, such as TEST or DEV. |
|
Clone request |
A request to initiate and manage a clone operation. |
|
Clone profile |
A reusable configuration that defines supported clone settings and associated preservation, exclusion, and cleanup rules. |
|
Data preserver |
A rule used to preserve selected target-instance data across the clone operation. |
|
Clone exclusion |
A rule that prevents specified source-table data from being copied to the target, according to the configured exclusion. |
|
Cleanup script |
A script configured to perform specific cleanup or post-clone activities, depending on its execution stage and supported configuration. |
3.How to create a Clone Profile
A Clone Profile allows you to define reusable settings for a clone operation.
Steps
- Navigate to Clone Profiles.
- Click New.
- Enter a meaningful profile name.
- Select the target instance, if required by the form.
- Configure the supported clone settings.
- Save the record.
After saving, you can use the profile's related lists to configure exclusions, data preservers, and cleanup scripts. You can also use the Create Clone Request link if it is available on the form.
4. Clone Profile Related List
1.Data Preserver saves selected records from the target instance before cloning and restores them after the clone's exclusion phase.
Suppose your company has two ServiceNow instances:
|
Details |
Production (PROD) |
Development (DEV) |
|
Users with admin access |
3 |
15 |
|
Purpose |
Live business operations |
Development and testing |
In DEV, 15 developers have the admin role because they need it to develop and test applications. In PROD, only three users have admin access because production access is more restricted.
What happens when we clone PROD to DEV?
When PROD is cloned into DEV, the existing DEV data may be overwritten by production data. As a result, the 15 developers in DEV may lose their required admin role assignments if those assignments are replaced by PROD's role data.
How does a Data Preserver help?
A Data Preserver saves selected data from the target instance (DEV) before cloning and restores it at the appropriate stage of the clone process.
This helps retain the required DEV-specific data, such as selected user-role assignments, while refreshing DEV with PROD data.
Important: To preserve admin role assignments, identify and preserve the relevant user-role assignment records, not just the user records. Always verify the preservation rules and ensure that access remains appropriate after cloning.
How to create a Data Preserver
- Open the source instance (PROD).
- Go to System Clone → Preserve Data.
- Click New.
- Enter the following details.
|
Field |
Example |
|
Name |
DEV_User_Preserver |
|
Table |
User [sys_user] |
|
Condition |
Select the users you need to preserve, if supported by the form |
|
|
|
2.Clone Exclusions : Prevent selected source data from being copied to the target.
Ex. Exclude sensitive production data or specific tables that should not be replicated into DEV or TEST.
How it works: The exclusion rule determines which source data is omitted from the clone. It does not automatically preserve the target's existing records.
3.Cleanup Scripts :Perform required cleanup or post-clone actions.
Examples:
- Disable outbound email in a non-production instance.
- Disable or reconfigure integrations that must not connect to production systems.
- Reset environment-specific settings or test data.
How it works: Configured scripts execute at their designated stage of the clone process. Review their execution timing and permissions before use.
7. How to create a Clone Request
Once your Clone Profile and related rules are ready:
- Open the Clone Profile and select Create Clone Request, or navigate to the clone-request interface.
- Select the source instance, such as PROD.
- Select the target instance, such as DEV or TEST.
- Select the applicable Clone Profile.
- Configure the requested schedule and other available options.
- Choose the people who should receive email notifications about the clone request.
Review the settings and submit the request using the available controls
After submission, monitor the clone request's status and available logs to confirm whether the clone has completed successfully.
Before starting, confirm the target instance, preservation rules, exclusions, integrations, email behavior, and any other environment-specific requirements.
6. Other ways to protect target-instance data
Data Preservers are not the only option. The right method depends on whether you need to protect data, configuration, or environment-specific settings.
|
Method |
What it is used for |
Important consideration |
|
XML export/import |
Exporting and restoring supported ServiceNow records |
Must be performed and validated appropriately |
|
Update Sets |
Moving supported configuration changes between instances |
Not a general-purpose backup for all table data |
|
Application Repository / Source Control |
Managing and promoting application configuration and code |
Primarily for supported application development workflows |
Please feel free to correct me if I have missed anything or if any information is incorrect. If you find this article helpful, please mark it as helpful.
Thank you!
Regards,
Tejas
