How to preserve local user roles while cloning from another instance?

stevedag
Kilo Expert

We often clone from our Prod instance to our Dev instance so our data is updated and we're sure the DEV instance is well synchronized with our production.   However, in our DEV instance we gaved higher roles to some user to allow them to test their module.   For example, most of them have the personalization role to allow them to personify in DEV, but are allowed to personify in production.

When we clone the DEV instance from PROD, those extra roles are lost and we have to give them back after the clone process.   What's the best way to preserve those extra roles although we clone the instance?

Thank you!

Steve

1 ACCEPTED SOLUTION

Hi Dimitar!



I created a new forum for cleanup scripts after cloning.


This should help you and others!



This should all help.



Preserve data and activity post clone - Cleanup Scripts



Have fun!


View solution in original post

10 REPLIES 10

Deepak Ingale1
Mega Sage

If I remember correctly, you can add some tables to 'exclude' while doing cloning operation.


That being said, and if you have assigned only OOB roles to your users in DEV, I think you will probably have to exclude at least three tables from cloning


1)sys_user


2) role table (I don't remember table name)


3) role and user table (I guess it is sys_user_role) which store relation between single role to single user.


Here is another one to preserve the data on target table *


http://wiki.servicenow.com/index.php?title=System_Clone#Preserving_Data_on_the_Target_Instance


You can go through it to check if you can select the tables of your choice you want to preserve


Capture.PNG



1) sys_user


2) sys_user_role


3) sys_user_has_role