Help! : How to restore data to previous version?

tomlumbard
Kilo Expert

Hi SNC,

We have an asset table(s) and CMDB table(s). The sync script between the two was broken which we were tasked to fix. This has now been fixed and rolled out to our production site. The idea was once a user went into either a ci or asset record and updated/validated the data this would be synced to the corresponding asset/ci and the tables would slowly sync up. This morning a system job ran on the asset table and updated every single record this then triggered the sync and overwrote alot of our CMDB records. The problem with this is our asset table was wildy inaccurate.

Is there a way to role back the updated records to a previous version?

Many thanks,

Tom

4 REPLIES 4

santoshsahoonis
Kilo Guru

Hello Tom,



You have to use a Fix script to revert the changes. The fix script will query the sys_audit table for changes to the CMDB.



The script will be a bit complex. So, test the script in some demo instance before you execute them in PROD.


Thanks Santosh,



What is a 'Fix script' . Is this something ServiceNow provides or user written?



Thanks,



Santoh


Fix Script is like executing background script "in the background". The script has to be written by you, which should look the sys_audit table and update the records back to a previous state.



Fix Scripts - ServiceNow Wiki



One more thing, if you are not sure about scripting, I would suggest you contact someone in your company with knowledge on this.


Pradeep Sharma
ServiceNow Employee
ServiceNow Employee

Hi Tom,



You can restore previous backup of your instance over any of your non production instance and then you could xml export/import data from that instance. You need to create a HI ticket for this.


Please refer section 5 here for more info.


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