What all objects should I consider for table preserver and exclusions before cloning?
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
‎02-25-2022 08:23 AM
What all objects should I consider for table preserver and exclusions before cloning, apart from OOB records?
If you have maintained any such list, can you please share?
Thanks!
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
‎02-25-2022 09:32 AM
Below are a few that you may want to consider. Note: the users and roles aren't necessary - it will depend on how your organization wants the data structured. Some organizations want only a subset of users from PROD in the DEV environment for example.
Excludes (make sure you understand that if you don't have a preserver with the same table name, then it will delete all the records in the target instance):
User (sys_user)* - must have preserver or it will stop the clone
User Roles (sys_user_role)
Groups (sys_user_group)
User Has Roles (sys_user_has_role)
Group Has Roles (sys_group_has_role)
User Role Contains (sys_user_role_contains)
Preservers:
User Preferences
Favorites
Recent Selections
Update Sources - Update Set Retrieval - if you don't preserve it then it will show the same ones from the Source Instance after the clone
User Role Contains
Group Has Roles
User Has Roles
Groups
User
User Roles
The tables you want to consider might also depend on which subscriptions your organization has purchased. If you have a sandbox or temp instance, I'd try cloning that one first and then see what the results are. That way you can restore it from a backup if you need to.
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
‎02-25-2022 09:35 AM
First i ask my all the clients across the region to provide the data they want as backup and to be retained
via excel sheet .
Then schedule cloning on weekends. generally Saturday mid night so that cloning is completed by sunday afternoon. your cloning time depends upon your exclusion/preserver list.
NOTE:- Exporting xml of a table does not export its related tables. You have to take backup individually
1. our preservers list (use condition to preserve only the data you want)
sys_properties // extract all properties by Application scope wise for dev and test
sys_user_has_role // impersonator roles and special role are given to some of my clients
sys_user // users manually created for testing purposes and integration user for dev and test
ecc_agent_config //mid server related table
sys_user_group // group only created for dev and test
sys_user_grmember // group members related to group.
Task table(incident+change) // filter the conditions as per the client request. these inc,change are created via integration for us which need to be tracked down
2. Our Exclusions list
Email properties // most important
mid server // mid server which we don't want to duplicate as its not required
discover schedule // the discovery jobs not required . individually import only if required
discovery status // they should not be cloned
logs // any kind of logs. they are already OOTB excluded
Any kind of table which provides real time data or its very big( 100 million records) we exclude it
3. you can create your own post-cleanup scripts. In our case we cleanup notification logs so that email notifications do not trigger which are in ready state (or simply add them in exclusion table)
4. post cloning dump the backup we have taken before monday morning.
There are total of 6 scenarios of cloning where it takes combination of exclusion and preservers
very well explained in this article
https://support.servicenow.com/kb?id=kb_article_view&sysparm_article=KB0717012
If you have any doubt/query related cloning, everything is mentioned in this below article
https://support.servicenow.com/kb?id=kb_article_view&sysparm_article=KB0715621
If you find it helpful, please mark my answer as correct so that it can useful to others.
Anshu