How to rollback an import

Nithya Devi
Tera Contributor

Hi,

Could anyone suggest how to rollback the import that done via data source.

Data source Import;

Type- File.

Format- CSV

File Retrieval Method- Attachment.(manual attachment)

 

regards,

Nithya.

 

 

1 ACCEPTED SOLUTION

Chaitanya ILCR
Mega Patron

Hi @Nithya Devi ,

 

Directly rolling back an import set in ServiceNow, in the same way you might rollback an update set, is not a built-in feature. Once an import set has transformed data into target tables, the changes are committed.

 

you can can go through the import records and their targets

if the operation is insert you can delete the target record

 

if the operation is update it's going to be complex

if you the audit is enabled on the table you can try to go through the audit data and undo the changes

 

also I found this, see if this is of any use to you

https://www.servicenow.com/community/servicenow-ai-platform-articles/rollback-import-sets/ta-p/23060...

 

 

Please mark my answer as helpful/correct if it resolves your query.

Regards,
Chaitanya

View solution in original post

7 REPLIES 7

Shashank_Jain
Kilo Sage

@Nithya Devi ,

 

ServiceNow does not provide a one-click “rollback” for data imports. Once a Transform Map has run and data is written to the target table, there is no native undo.

 

 

  • Identify the Created and Updated records.

  • Use a list filter or background script to delete/revert those.

  • If the import was large, you may need to request a database restore from ServiceNow Support (HI ticket).

  • This can only restore to a backup point, so it may affect other data created since.

 

 

If this works, please mark it as helpful/accepted — it keeps me motivated and helps others find solutions.
Shashank Jain

Hi Shashank,

 

Thanks for your response.Sometimes by mistake  we will attach different files in data source. Everytime approaching backup from servicenow is not appropriate.As  said,we can delete the inserted record,but how to recover the updated record.

 

Regards,

Nithya.

@Nithya Devi ,

 

You have these updated records in another instance too.

You can export the xml from that instance and import it in your instance. Records will revert back to the position where they were before running the transform map.

 

 

 

If this works, please mark it as helpful/accepted — it keeps me motivated and helps others find solutions.
Shashank Jain