Is there a way to tell if my Dev instance was cloned recently?

PN2
Kilo Expert

Is there a way to tell if my Dev instance was cloned recently?  I looked at Dev's Clone History but it is blank.

9 REPLIES 9

Weston,

I don't see com.glide.email_accounts.  I do see com.glide.rollback though?  Not sure if that matters. 

Do you have any idea of when the last clone would have happened, if ever? Clones can only happen if a user has sufficient permissions in the development instance. If this is a ServiceNow personal developer instance, those cannot be cloned. 

PN2
Kilo Expert

Yes a clone was completed in our Dev environment yesterday 10/22.  The only way that I can tell that it was done is because our data now matches Prod.  But is there any other way to check and confirm that Dev has been cloned and completed?

James-B
Kilo Sage

Hi,

 

Figured I would post my solution to this seen as this thread seems to have had a few hits but no solution. 

 

I created a clone clean-up script like so:

 

var propName = "last_clone_date";
var propValue = new GlideDateTime().getValue(); // Current date/time

var prop = new GlideRecord("sys_properties");
prop.addQuery("name", propName);
prop.query();

if (prop.next()) {
    // Property exists, update it
    prop.value = propValue;
    prop.description = "The date this instance was last cloned.";
    prop.ignore_cache = 'true';
    prop.update();
} else {
    // Property doesn't exist, create it
    prop.initialize();
    prop.name = propName;
    prop.value = propValue;
    prop.description = "The date this instance was last cloned.";
    prop.type = "string";
    prop.ignore_cache = 'true';
    prop.insert();
}

 

jens_t
Giga Contributor

Yeah, if the Clone History is blank, it does make things a bit tricky — but there are still a few ways you might be able to tell if your Dev instance was cloned recently. First, check for anything that feels “reset” — like missing recent test data, default users showing up again, or roles that got wiped. Those can be signs that a fresh clone happened.

Also, if your platform keeps system or audit logs, you might be able to spot some clues there — sometimes clone actions are logged even if they don’t show up in the UI. If you’re using something like ServiceNow or a managed cloud platform, reaching out to your admin or support team might help too — they usually have access to backend activity logs that we can’t see. Hope that helps!