---
title: "Export the site data from the source environment"
slug: "export-the-site-data-from-the-source-environment"
abstract: "How to export all the required items for the site from the source environment."
---

# Export the site data from the source environment

This process exports all items from the Sitecore site source environment and uploads them to Azure Blob Storage, where they can be accessed by the [SitecoreAI Pathway](https://doc.sitecore.com/sai/en/developers/sitecoreai/migrate-a-site-to-sitecoreai.html) app.

> [!IMPORTANT]
> When migrating Sitecore websites, you must have _Admin_ access for XM/XP to change the security settings in the config and upload the extraction handler. You must also have .NET 10.0 installed.

> [!NOTE]
> With non-Sitecore websites, this procedure is not needed as the site data is extracted using a crawler.

To export the site data from the source environment:

1. Unpack the `SXPSiteExtraction` downloaded from the **SitecoreAI Pathway** app.

2. In your CM server, locate the `AppConfig/Sitecore/ServicesClient/Sitecore.Services.Client.config` file and ensure that the `Sitecore.Services.SecurityPolicy` setting has the value `Sitecore.Services.Infrastructure.Web.Http.Security.ServicesOnPolicy`.

   This change allows the extraction handler to access the required APIs.

   > [!IMPORTANT]
   > Revert this setting to its original value after the extraction is complete.

3. In your CM server, navigate to the `sitecore/admin` directory and upload the `ExtractorHandler.ashx` file that was part of `SXPSiteExtraction.zip`. To verify the handler is accessible, send a request to the `.ashx` file. A valid response indicates the handler is working correctly.

4. On the **Configure SitecoreAI instance** page of the migration wizard, in the **Generate storage for source Sitecore XP page data** section, click in the **Upload URL** field and copy the Azure Blob Storage URL.

   ![Configure SitecoreAI instance Azure Blob Storage URL](https://doc.sitecore.com/api/markdown-image/sai/en/developers/sitecoreai/images/pathway/azure-blob-url-14.png)

5. Open a terminal and run the extraction app (`Extractor.App.Con.exe`) with the following parameters:
   - `cmHostName` - the hostname of the source Content Management (CM) server host (host name only, without protocol).
   - `userName` - the user with admin permissions on the CM server..
   - `password` - the password for the admin user.
   - `domain` - the domain of the CM server. 
   - `uploadUrl` - the Azure Blob Storage container URL with a Shared Access Signature (SAS) token that has read and write access.
   - `skipExpandedRendering` - whether to skip the Item ID Expansion process for renderings during JSON file extraction.
   - `threads` - the number of parallel threads to use.

   For example:

   ```
   .\Extractor.App.Con.exe --cmHostName={YOUR_CM_HOST} --userName={YOUR_ADMIN_USER_NAME} --password={YOUR_PASSWORD} --uploadUrl="{UPLOAD_URL}"
   ```
