Select to view content in your preferred language

Restore a deleted feature service

03-31-2023 02:08 AM
New Contributor III

Can we restore a deleted entity service on an ArcGis server?
Unfortunately, it is impossible for us to republish, as we do not know where the service was published or on which database it was linked.

0 Kudos
3 Replies
MVP Frequent Contributor

Hello @SigLM

maybe this can help

Is it possible to retrieve a deleted feature service from ArcGIS Online?

No, it is not possible to retrieve a deleted feature service from ArcGIS Online. Once a feature service is deleted from ArcGIS Online, the REST endpoint of the service is deleted as well. Without the service endpoint, it is not possible to access the service definition information that is needed to recreate the feature service.

However, if a service definition file is created and saved when the feature service is published, the service can be republished using this service definition file. Nevertheless, this only recovers the original features because any edits that were made to the feature service are not written to the original service definition file. A service definition file can be republished from its Item Details page in ArcGIS Online.

As a precautionary measure, it is recommended for users to enable ‘Delete Protection' on important items before publishing a feature service initially. ‘Delete Protection’ can also be enabled on the published feature service to help prevent accidental deletion. This setting can be enabled through the Item Details page in ArcGIS Online while editing the item properties. Check the Delete Protection option to avoid having the item accidentally removed from the site. For more information, refer to ArcGIS Blog: Protecting your ArcGIS Online items.

Users may also back up content in ArcGIS Online by following instructions provided in HowTo: Back up content in ArcGIS Online.

0 Kudos
Occasional Contributor III

If you're talking about your own ArcGIS Server machine, talk to your admin team and see if they can restore a backup of your AGS directories that you can poke around in. Somewhere in there you should find the .msd file included with the service, or some other bit of data you can use to track down what you need to republish the data.
If this was a hosted AGOL service then like Bill said, you're out of luck.

Esteemed Contributor

Can you go to Server Manager where the deleted service was published from and look at Site tab and Directories to see where the Output folder is pointing to?

Then go that folder and look for a subfolder of arcgisserver\directories\arcgissystem\arcgisinput\

Then navigate to the virtual folder where the service was published to unless it was the root.

Then go to "Virtual Folder"\"Published service name".MapServer\extracted\v101

There should be an msd and mxd file here that should be able to recover and republish the service with.

0 Kudos