Notifications

216 views

Overview


Objective of this KB is to answer a few frequent requests/questions Tech support receives in related to clones. Please append the generic questions in the comments so that we can keep this KB updated.

This information is generic and if you have follow-up questions, please create a ticket to us.

 

FAQ

How does the clone work?Can I rollback my clone?If I check the audit and log data option, why is my other data excluded?
What do all the options do for cloning?Can I clone from a specific date?Can I request a backup to be taken before my clone?
Node in charge of the clone is offlineThe clone pre-flight check for valid capacity mapping has failed" on clone to demo or pov instance as targetCan I clone over my production instance?
How do Excluders work?How do Preservers work?How do clone cleanup scripts work?
Can I have cleanup scripts per instance?After a clone, comments/updates all show as a different user and time?What is a draft? why can I not delete these?
Why is clone 'on hold'?How can I preserve my ATF jobs?I have renamed my instance and cannot create a new clone target?
How to do a full clone?If I clone to another instance will the release change?

 

 

 

How does the clone work?



In response to a clone request, the ServiceNow platform performs the following tasks:

    1. Generates a file to preserve operational data on the target server.

      This file contains the data preserved by data preservers.

    2. Creates a new database for the target instance
    3. Restores the database schema and data from the latest backup to the newly created database
    4. After all data is copied across it starts the exclude/preserver functions
    5. If Exclude options are ticked
      1. Tables in the exclude module are truncated (All data is cleared out)
    6. File created in Step 1 for preservers is loaded into the target database (overwriting any data from the restore)
    7. Email functionality is disabled in the target database
    8. Once all completed the target instance repoints to the newly created database
    9. All Clone cleanup scripts are executed in target instance.
      1. Regenerate Text indexes
      2. Clear scheduled job node associations
    10. The clone is complete and instance is accessible for the customer.
    11. After clone completes a backup is taken of the old Target database (Can be rolled back for up to 7 days)
    12. Once backup completes the old target database is retired.

Can I rollback my clone?


As we take a backup of the database after the clone process we can rollback the clone up to 7 days after the clone was run.

To request a rollback please raise an incident in HI to request a rollback of a clone.

 

If I check the audit and log data option, why is my other data excluded?


 

  • Pre kingston, the exclude audit and log data is not just for excluding audit and log data, if this is ticked then it will run all the excludes in the exclude module.
  • Kingston and above, the exclude audit and log data is only for excluding audit and log data, there is another option "Exclude tables specified in Exclusion List" which will run all the excludes from the exclude module.

What do all the options do for cloning?


 

 Pre Kingston: https://docs.servicenow.com/bundle/kingston-platform-administration/page/administer/managing-data/task/t_StartAClone.html

FieldDescription
Exclude tables specified in Exclusion ListPrevent cloning records from the source instance specified in the System Clone > Exclude Tablesmodule. Use this option to create empty but usable tables on the target instance. By default, the system excludes tables for auditing, license usage, logging, and notifications. This option is selected by default.
Note: This option is not supported by the legacy clone engine.
Exclude audit and log dataPrevents cloning audit and log records from the source instance. Use this option to create empty but usable audit and log tables on the target instance. This option is selected by default.
Exclude large attachment dataPrevents the cloning of large attachments such as video files, image files, and other typically large binary file types. Excludes all common binary file types, regardless of file size. When selected, the clone also excludes attachments from the Attachments [sys_attachment] and Attachment Documents [sys_attachment_doc] tables that meet all these criteria.
  • The attachment table_name value does not indicate it is a small file. Small attachments have table name values that start with ZZ_.
  • The attachment data type value indicates it is a large file such as application or video.
  • The attachment table_name is not one of these system tables: sys_certificate, ecc_agent_jar, ecc_agent_mib, sys_store_app, or invisible.sys_store_app.

This option is selected by default.

Preserve themeEnables data preservers for the target instance theme and CSS elements. This option is selected by default.

Kingston 

In Kingston we add the feature for Exclude Tables specified in Exclusion List

https://docs.servicenow.com/bundle/kingston-platform-administration/page/administer/managing-data/task/t_StartAClone.html

FieldDescription
Exclude tables specified in Exclusion ListPrevent cloning records from the source instance specified in the System Clone > Exclude Tablesmodule. Use this option to create empty but usable tables on the target instance. By default, the system excludes tables for auditing, license usage, logging, and notifications. This option is selected by default.
Note: This option is not supported by the legacy clone engine.
Exclude audit and log dataPrevents cloning audit and log records from the source instance. Use this option to create empty but usable audit and log tables on the target instance. This option is selected by default.
Exclude large attachment dataPrevents the cloning of large attachments such as video files, image files, and other typically large binary file types. Excludes all common binary file types, regardless of file size. When selected, the clone also excludes attachments from the Attachments [sys_attachment] and Attachment Documents [sys_attachment_doc] tables that meet all these criteria.
  • The attachment table_name value does not indicate it is a small file. Small attachments have table name values that start with ZZ_.
  • The attachment data type value indicates it is a large file such as application or video.
  • The attachment table_name is not one of these system tables: sys_certificate, ecc_agent_jar, ecc_agent_mib, sys_store_app, or invisible.sys_store_app.

This option is selected by default.

Preserve themeEnables data preservers for the target instance theme and CSS elements. This option is selected by default.

London and above:

In London we added the feature: Amount of data copied from the Task table

https://docs.servicenow.com/bundle/london-platform-administration/page/administer/managing-data/task/t_StartAClone.html

FieldDescription
Exclude tables specified in Exclusion ListPrevent cloning records from the source instance specified in the System Clone > Exclude Tablesmodule. Use this option to create empty but usable tables on the target instance. By default, the system excludes tables for auditing, license usage, logging, and notifications. This option is selected by default.
Note: This option is not supported by the legacy clone engine.
Exclude audit and log dataPrevents cloning audit and log records from the source instance. Use this option to create empty but usable audit and log tables on the target instance. This option is selected by default.
Exclude large attachment dataPrevents the cloning of large attachments such as video files, image files, and other typically large binary file types. Excludes all common binary file types, regardless of file size. When selected, the clone also excludes attachments from the Attachments [sys_attachment] and Attachment Documents [sys_attachment_doc] tables that meet all these criteria.
  • The attachment table_name value does not indicate it is a small file. Small attachments have table name values that start with ZZ_.
  • The attachment data type value indicates it is a large file such as application or video.
  • The attachment table_name is not one of these system tables: sys_certificate, ecc_agent_jar, ecc_agent_mib, sys_store_app, or invisible.sys_store_app.

This option is selected by default.

Amount of data copied from the Task tableSelect the amount of data to clone from the source instance Task table. By default, the target instance receives the last 90 days of Task table records from the source instance.
Preserve themeEnables data preservers for the target instance theme and CSS elements. This option is selected by default.

 

Can I clone from a specific date?


Clone requests always use the latest backup for the source instance,

  • If you wish to use a date older then the latest backup you will need to raise a backup restore request in HI 
  • If you wish to take a fresh backup before taking the clone then you can raise an incident for Support to add you to the backup list so a fresh backup will be taken before the clone processes (Know that this can increase clone time as it needs to take a fresh backup which can take some time)

 

Can I request a backup to be taken before my clone?


 If you wish to have a fresh backup to be taken just before the clone is kicked off you can do this by raising an incident in HI so that your instance to be added to on Demand Backup list to take a backup just before the clone

  • This can increase clone times, as if you backup takes 6 hours, it will need to wait 6 hours for the backup to complete before it runs the clone engine.

My clone failed with message "Node in charge of the clone is offline"


This error message happens when the instance is being repointed to the new database and a health check is done on the node and it is offline causing this message. This can be safely ignored as the clone is working as designed it is just a timing issue with the health check.

This is known problem: PRB1262541 - "Clone engine from backup has ownership of the clone request" /"Node in charge of the clone is Offline" message on INSTANCE clone history 

 

My clone failed with message "The clone pre-flight check for valid capacity mapping has failed" on clone to demo or pov instance as target


This error message happens when you are trying to clone over a instance which is too small and is not setup to grow in size.

Demo and POV instances are built to only grow to a specific size, so they can be cloned too if the source instance is also small, but once it grows to a specific size you cannot use demo or POV instances for cloning. You must then clone over a sub prod instance (which has the capability to grow in size)

 

Also to note we cannot increase the size of a demo or POV instance, we will always request to clone over a sub prod instance.

 

Can I clone over my production instance?


Yes, you can clone over any of your instances, but there is a system property (glide.db.clone.allow_clone_target), if this is set to True it will allow a clone to run, if false it will not allow you to clone.

 

  • System property on target instance: verify the system property glide.db.clone.allow_clone_target is set to True. By default, this property is enabled on instances whose name ends in Dev, Test, Stage, UAT, or QA.

How do Excluders work? 


  • All Exclude settings must be setup on your SOURCE instance
  • Created  per table, you cannot use condition based Excluders
  • They are only actioned for the SOURCE data
  • When excluding a table it truncates the table so no data will be kept from the source instance
  • By default the exclude options are selected for cloning
  • If you remove the options for excluding before cloning you will not exclude any data
  • You can Exclude and Preserve the same Table

How do Preservers work? 


  • All Preservers settings must be setup on your SOURCE instance
  • You can only preserve data not tables or columns
  • Created per table, you can use condition to only preserve specific data
  • They are only actioned for the TARGET data
  • Data will be imported after the Exclusions are actioned.
  • These will always run on every clone.
  • You can Exclude and Preserve the same Table
  • You can only preserve a table from the target instance if it also exists in the source instance (This is because table structure cannot be preserved only data)
  • Also preservers are for preserving key data and not a mass amount of data, if you do preserve mass amounts of data the clone can break or take a very long time to run. Would advise not to preserve mass amounts of data.

 

How do clone cleanup scripts work? 


  • After the clone completes all cleanup scripts are created as scheduled jobs and run till completion
  • There is no such ordering in cleanup scripts they will run in different orders
  • Must be defined on the SOURCE instance.

Can I have cleanup scripts per instance? 


  • You cannot have cleanup scripts specifically for certain instances
  • But you can define in the cleanup script to check the instance name system property and then depending on the result do specific jobs
  • EG:

var instanceName = gs.getProperty('instance_name');
if (instanceName == 'testdev')
{
// Do specific jobs for dev instance
}
else if (instanceName == 'testsandbox')
{
// Do specific jobs for sandbox instance
}

 

 

After a clone, comments/updates all show as a different user and time?


 This is as designed, if you clone with excluders you are excluding the sys_audit table, the sys_audit table is used to keep the user, date and time for each comment and update so without the sys_audit it will use the sys_created_by and sys_created_at fields for all comments on the record.

If you view the history of the record all the updates will show as update 0

 

What is a draft? why can I not delete these?


When you click on the UI to submit a clone, a record is created in the clone table, if you do not proceed with the clone or click out of the pop up window the record will stay in your system as a 'draft' but this can be safely ignored. The reason these cannot be deleted is because these have a link to an internal instance at ServiceNOW which manages the Clone requests.

Why is clone 'on hold'


When a clone's 'State' is set to 'Hold', this means the server rejected the clone request. Here are some of the most common reasons:
  • The clone was not ready to proceed by the scheduled time.
  • In pre-London releases, additional clone requests were submitted before the first one completed. The source clone for these requests are the same. We only allow 1 clone per database server source.
  • Target instance is not downgraded.
  • Problem with the backup used for the clone.

More information can be found here: https://hi.service-now.com/kb_view.do?sysparm_article=KB0694499

 

How can I preserve my ATF jobs?


If you wish to preserve all of your ATF Test, suites and results:

You need to add preservers for the following tables:

test_execution

sys_rest_message_fn_test
sys_atf_variable
sys_atf_test_template
sys_atf_test_suite_test
sys_atf_test_suite_result
sys_atf_test_suite
sys_atf_test_result_step
sys_atf_test_result_item
sys_atf_test_result
sys_atf_test
sys_atf_step_env
sys_atf_step_config_category
sys_atf_step_config
sys_atf_step
sys_atf_remembered_values
atf_output_variable
atf_input_variable

sys_variable_value

 

I have renamed my instance and cannot create a new clone target


After you have renamed your instance you have tried to logon to the instance and tried to create a new clone target for the instance, this will not work as the instance is already in your instance under the old name.

To fix you can follow the steps from this KB:

https://hi.service-now.com/kb_view.do?sysparm_article=KB0550896

 

How to do a full clone?


When someone asks to do a full clone this means that when you clone you should untick all the exclude options. If you are in London you will also have the option Amount of data copied from the task tables you should set this to all.

 

This means no excluders will run in the clone and it will be as close a replica of your source instance as possible.

 

 

If I clone to another instance will the release change.


Yes, as when you are cloning you are making a replica of your source instance, so it will match in table structure and version.

 

So if you clone a Kingston over London, the target instance will be a Kingston release.

Vice-Versa

If you clone a London over a Kingston, the target instance will become a London release.

 

 

Article Information

Last Updated:2018-11-11 11:44:23
Published:2018-11-11