ERROR

Failed to restore the Portal for ArcGIS

Last Published: August 14, 2020

Error Message

Attempting to restore a backup of Portal for ArcGIS with the webgisdr utility fails, and returns the following error message:

Error:   
Failed to restore the Portal for ArcGIS.
Admin Url: https://machineName.domain/portal.
{"error":{"code":500,"details":null,"message":"Failed to import site. Failed to
import content directory."}}
Running the importSite operation from the portaladmin endpoint using ArcGIS REST API also returns an error message:
Error:   
Failed to import site. Failed to import content directory. Code 500.
The following error message is also displayed in the Portal logs:
Error:   
java.io.FileNotFoundException: C:\arcgisportal\content\items\8fed86c190a14c98bdc3ce53d2286c73\esriinfo\screenshots\Thumbs.db (Access is denied)
Following these errors, attempting to open Portal for ArcGIS prompts the user to create a new site or join an existing site.

Cause

This issue is caused by the creation of Thumbs.db files in the Portal for ArcGIS backup file during the backup process, as Portal does not have access to these files.

When searching the file directory presented by the Portal logs, no Thumbs.db file is found, as the file is within the backup created by Portal.

Solution or Workaround

Use the following workarounds with the webgisdr utility, or the ArcGIS REST API exportSite and importSite operations.

Note:
Enable File Name Extensions in Windows File Explorer before proceeding with the workarounds in this article. To enable this, open Windows File Explorer, and select the View tab. Check the File Name Extensions option.

Using the webgisdr utility

  1. Extract the .webgissite backup file using a file archiving software, such as 7-Zip. This extracts the .agssite, .portalsite, and data store files.
  2. Extract the .portalsite file. This extracts the arcgisportal folder.
  3. Navigate to arcgisportal > content, and remove all the Thumbs.db files.
  4. Right-click the arcgisportal folder, and select Send to > Compressed (zipped) folder. This file is now compressed, and titled arcgisportal.zip.
  5. Rename the arcgisportal.zip file to the original .portalsite file name used in Step 2.
  6. Select the .agssite, data store, and the new .portalsite files. Right-click these files, and select Send to > Compressed (zipped) folder. Rename this new .zip file to <fileName>.webgissite.
  7. Apply the necessary read and write permissions to the new .webgissite file for the Portal for ArcGIS Windows service account.
  8. Run the webgisdr utility to restore the backup.

Using the ArcGIS REST API exportSite and importSite operations

  1. Extract the .portalsite backup file created by the exportSite operation with a file archiving software, such as 7-Zip. This extracts the arcgisportal folder, containing the content and db folders.
  2. Navigate to arcgisportal > content, and remove all Thumbs.db files.
  3. Right-click the arcgisportal folder, and select Send to > Compressed (zipped) folder. This file is now compressed, and is titled arcgisportal.zip.
  4. Rename the arcgisportal.zip file to the original .portalsite file name used in Step 1.
  5. Apply the necessary read and write permissions to the new .portalsite file for the Portal for ArcGIS Windows service account.
  6. Log in to the portaladmin endpoint with an administrator account, and navigate to Home > Import Site.
  7. Enter the location of the new .portalsite file in the Source (File path with extension .portalsite) field. Click Import Site. For more information on the importSite operation, refer to ArcGIS REST API: Import Site .

Article ID:000018066

Software:
  • Portal for ArcGIS

Receive notifications and find solutions for new or common issues

Get summarized answers and video solutions from our new AI chatbot.

Download the Esri Support App

Related Information

Discover more on this topic

Get help from ArcGIS experts

Contact technical support

Download the Esri Support App

Go to download options