Cloning 1 table - data only

scottangehr
Giga Guru

Does anyone know a way to only bring over records and attachments to a sub-prod instance for 1 table?

We have a sub-prod that has been configured but we don't  need all the tables, platform configuration, etc.

Thanks
Scott  

1 ACCEPTED SOLUTION

Chuck Tomasi
Tera Patron

Hi Scott,



You should be able to do an Export XML to get the records and all meta data on that table.



Exporting Data - ServiceNow Wiki


View solution in original post

14 REPLIES 14

We have to move one of our teams off our production instance to a sub-prod for a project of going back to OOB.   The sub-prod instance has been cloned (3 months ago), customized to their needs, and user tested.   I need to copy over only the records since the last clone so they have their data for reporting.



Does that make sense?


Thanks


Scott


chris_lo
ServiceNow Employee
ServiceNow Employee

Hello Scott,



Are these records linked to the attachments you are trying to bring over? If so how are you establishing attachments to bring over. Essentially you would have to do an export of the records (for example task records) and then also bring over sys_attachment and sys_attachment_doc records. This can get a little sticky as sys_attachment_doc can be quite large.



Sr. Technical Support



Chris


I need an exact clone from the production instance.   This would include records, attachments, audit history, etc for a custom table.  


antin_s
ServiceNow Employee
ServiceNow Employee

Hi Scott,



With the amount of data you are talking about, export/import may not help you. If clone is not an option and script running time is not a concern for you, you may achieve it through APIs, but it may run for a day or two.



Using the Table APIs, pull the data and related data from PROD instance and create the records in the Non-Prod. If you want to keep the same created/updated dates and users, you may use gr.autoSysFields(false); to retain the values from PROD. But, please remember you may need to take care of any reference fields too.



Hope this helps. Mark the answer as correct/helpful based on impact.



Thanks


Antin


antin_s
ServiceNow Employee
ServiceNow Employee

Hi Scott,



If any of the replies have answered your question, can you please mark it as correct to help the community?



Thanks


Antin