An instance clone copies configuration, code and data from a source instance onto a target instance, usually a non-production environment used for testing or upgrades. Before you request one, decide what the target keeps, what it does not receive, which cleanup steps run afterwards and how it authenticates. For related topics, see the ServiceNow platform guides.
How a clone changes the target
A clone replaces the target’s contents with the source’s contents, except for data you protect. Work-in-progress on the target can be lost if nobody checks it first.
The source is the instance you copy from, and the target is the one that gets overwritten. A data preserver protects target data, a table exclusion keeps source data out, cleanup scripts run after the copy, and a clone profile bundles these choices into a reusable template. Node repoint is a stage, not a state, in which traffic moves to the new instance. Large estates can use clone chaining, copying production to one test environment and then copying that environment onward, so lengthy post-clone work runs once.
Register the target and choose authentication
Register a target under Configuration, then Clone instances. Enter the target URL, and the console runs a version check to pick an authentication method.
OAuth 2.0 is the recommended method. The target generates a Client ID, you paste it into the Add Clone Target form on the source, and you approve the connection on the target. After that one-time setup, each request obtains a short-lived token, so admin credentials are not entered per request. Setup needs clone_admin on the source, and clone_admin and oauth_admin on the target. OAuth requires Australia Patch 5 or later on both instances.
If the target does not support OAuth, the console falls back to basic authentication. The target user then needs the clone_admin and soap roles and an identity type of machine. A machine identity cannot sign in to the interface, so the account is meant for automated traffic; the REST and SOAP integrations guide covers that style of account. When a token expires, the request form asks you to authorize again on the target. If the request form shows an authentication error, its Authenticate dialog offers Reset OAuth, which repeats the Client ID exchange.
A credentials error during registration has different causes by release. From Australia Patch 5, authentication can redirect to a single sign-on provider when both instances are on that release or later. Earlier releases need the target credentials as a user record or through LDAP. The remedy is credentials for an admin-role user.
Exclusions and preservers answer different questions
An exclusion keeps source records of a table out of the copy. A preserver saves target records before the clone and reapplies them after exclusions finish.
An excluded table keeps its schema and hierarchy, so it is empty but still usable. Excluding a parent table also excludes its children: excluding the task table removes incident, problem and change records too. Wildcards need a dot before the asterisk, so sys_script.* covers all tables with that prefix. sys_db_object and sys_db_object.* cannot be added to the exclusion list.
The user tables form one set: sys_user, sys_user_role, sys_user_has_role, sys_user_group, sys_user_grmember, sys_group_has_role and sys_user_role_contains, plus customer_contact when Customer Service Management is active. Treat them together, because a split decision can stop sign-in after the clone. See also the instance security and access control guides.
Preservers are created on the source instance; one defined on the target does nothing. Each needs a table and optional conditions. Regular expression matching is not supported, and database views cannot be preserved. A preserver on a parent table also protects its children, except on MariaDB pairs. Preservers suit settings, not bulk records: export users, groups and roles before the clone and import them afterwards, as the data migration and import sets guide describes.
Build a clone profile for each scenario
A clone profile is a reusable template for settings, exclusions, preservers and cleanup scripts. The System Profile ships with the console and can’t be changed. An upgrade-testing profile usually needs full data and few exclusions, while an IT application profile might exclude request-type tables. Teams planning a release can pair that with upgrade readiness planning.
The profile has General (task data amount and backup type), Exclusions (exclusion list, audit and log data, attachment data, all on by default) and Preservers (theme, selected by default, and in-progress global update sets). A request with the profile field left empty applies all preservers, exclusions and cleanup scripts, so choose a profile for a narrow refresh.
Request a clone and read its options
A request needs a source, a target, a start time and notification addresses. Two requests to one target within a five-day window return an error, so space them at least five days apart. The summary also highlights other requests to that target within 30 days. The clone uses the source’s latest daily backup, up to 36 hours old, unless you choose On-demand backup, which starts a fresh backup and delays the clone until it finishes.
| Option | Default | What it controls |
|---|---|---|
| Lock settings for this clone request | Not selected | Freezes profile settings at request time |
| Amount of data copied from the Task table | Full | Last 90 days removes older task records after the restore |
| Clone frequency | None | Repeats the clone weekly, every 2 weeks or every 4 weeks |
| Exclude audit and log data | On | Creates empty audit and log tables on the target |
Lock settings matter for clones scheduled well ahead, because a later profile edit could otherwise change a queued clone. Scheduled clones cannot be edited, so cancel and resubmit instead. The Last 90 days option adds work at the end of the run, and large preservers add time, so narrow them with conditions.
Update sets need attention. Work-in-progress update sets on the target are overwritten, so review and commit them before cloning. A profile can preserve in-progress global update sets created in the last 90 days. Developers must choose how to preserve unpublished applications, because preservers cannot save them. An application that is missing from the source is deleted from the target during the clone. The update sets and release management guide covers the steps.
Run cleanup scripts and check their status
Cleanup scripts handle post-clone work such as disabling email on a test instance. Create them under Configuration, then Cleanup scripts, with a name, an order number, the Active check and the script body; the role required is admin. Lower order numbers run first, so order matters when one script depends on another. Without error handling, a failing custom script can stop the scripts after it, so add error handling to custom scripts.
Each script on the target reports a state such as Scheduled, Executing, Completed, Error or Not executed. Not executed means conditional logic skipped it. To check progress, open the completed request’s Clone Status page, expand the cleanup section and follow the link to the target. Resume all remaining scripts reruns failed scripts and continues with the rest. Running scripts cannot be canceled from the interface.
Cancel a clone or roll it back
Cancellation works for a clone that is scheduled, requested or running, up to node repoint, and leaves the target in its pre-clone state. Rollback removes the updates from the latest clone and must run within seven days of it, or two days on sharded instances. A Hold state means the server rejected the request or another request arrived first. Contact technical support for an Error state.
Watch several environments from one instance
Multi-Instance View lets one primary instance show clone activity across linked instances, which needs Australia Patch 2 or later on both sides. Enable Multi-Instance View under Configuration, then use the Origin Instance filter to narrow the list. The Instance Overview tab shows each instance’s last clone date, which helps you spot stale environments.
How should a team run a ServiceNow clone instance from request to sign-off?
Plan the clone as a runbook with four owners: the requester, the source admin, the target owner and a privacy reviewer. Freeze target work and export what the clone would overwrite, choose a profile for the test purpose, treat the user tables as one set, and check sign-in and cleanup status before the target is used.
Assign the four roles before the first request
- Requester: picks the source, target, start time and profile, and keeps the notification list current.
- Source admin: holds clone_admin on the source and maintains the exclusions and preservers defined there.
- Target owner: commits or reviews work-in-progress update sets, and holds clone_admin and oauth_admin for the one-time registration.
- Privacy reviewer: approves the exclusion list before the request and checks the data after the clone.
Before the request: freeze, export and time the window
- Ask the target owner to commit or review every work-in-progress update set, and record the list in the request ticket.
- Export the users, groups and roles that must survive. Settings can sit in preservers, but bulk records need their own export and import.
- Pick the profile, then tick Lock settings for this clone request when you book well ahead, so a later profile edit does not change the queued run.
- Book the start time at least five days after any other clone to the same target, and review the summary for other requests to that target within the next 30 days.
Decide what privacy-safe means for this target
A nonproduction target receives whatever the source holds unless you exclude it, so privacy review is a list of tables, not a general policy. Start with the user tables, then the tables holding contact details, message content and attachments. The profile’s Exclusions section excludes audit and log data by default, and the privacy reviewer should sign off any change to that setting.
Some tests need realistic records without real personal details. Keep those rows, then blank or replace the sensitive fields in a cleanup script. Give that script the lowest order number, since lower numbers run first and any later script that reads those fields should see the cleaned values.
After the clone: the checks that matter
- Sign in as a standard user and as a user with an approver role, not only as an administrator, because treating one user table differently from the rest can block sign-in.
- Open the finished request’s status view, expand the cleanup list, and confirm each script shows Completed, or Not executed for a reason you expected.
- Check a sample of the masked records and confirm the fields show blanks, not values that still resemble real data.
- If Multi-Instance View is enabled, check that the Instance Overview tab shows the new clone date, so the next requester can see how old the data is.
Set the rollback decision date at the same time. Rollback must run within seven days of the clone, or two days on sharded instances, so record who may call it and the last day they can.
Frequently asked questions
Does a clone keep the target’s theme?
By default, yes. The Preserve theme option is selected on profiles and keeps the target’s theme and CSS. Turn it off and the copy replaces the theme.
Do I need admin credentials for every clone request?
Not with OAuth. Registration happens once per target, and each request gets a short-lived token. Basic authentication needs a dedicated machine account.
Why does a request return a five-day conflict?
Two requests to one target inside five days produce an error. Choose a start time at least five days after the other clone.
Can I undo a clone after it completes?
Rollback reverses the latest clone’s updates within seven days, or two days on sharded instances. A clone that has not reached node repoint can be canceled instead.
What if users cannot sign in after a clone?
Check the user tables first. Preserving or excluding one of them without the rest can break sign-in, so review the set together before the next clone.