Tagged: Update App

Sitecore Upgrade: The Update App Tool


sitecore-upgrade-updateapp-tool-default-items-cleanup-hero.png

 

In the previous post, we discussed the process of installing a vanilla instance of Sitecore XM 10.3.

I’m upgrading from Sitecore 9.3 to 10.3 instance and need to run the Database Upgrade scripts as part of the upgrade process. 

Before running the DB upgrade scripts, need to run a new tool that Sitecore has introduced – 

The Sitecore UpdateApp Tool

  • It is a standalone console tool 
  • Use this tool only if you are upgrading to 10.1.0 or later

The default items have been moved into resource files, the tool will remove them from your databases. (if they have not been modified) from the Core, Master, and Web databases.

  • If you have modified any of the default items, they are not removed and the tool adds a list of these items to its log file.
  • Sitecore recommends that you review this list and decide if you still need the modifications, and re-apply your customizations to the new items after you have deleted the old ones.
  • If you decide that you don’t need the modifications, delete these items from SQL databases.
  • That default content would come from the actual items resource file which will be placed in App_Data\Items.
  • If your solution contains any modules or connectors, you should use this tool to upgrade them.

Database Clean-up:

  • It is a one-time operation, run before running the Sitecore UpdateApp tool

To clean up the content databases:

On the Sitecore Launchpad, open the Control Panel, click Clean up databases, select all the databases, and then click Clean.

sitecore-updateapp-tool-default-items-cleanup-1

It will take some time. Once it succeeds, let’s move to the next step.

Sitecore.UpdateApp Tool:

Download the tool from Sitecore Downloads: Sitecore UpdateApp Tool

I navigated to Sitecore.UpdateApp 1.3.1 page since I’m upgrading it to Sitecore 10.3. The following chart shows which version of the tool you should utilize. 

sitecore-upgrade-updateapp-tool-default-items-cleanup-2

 

Inside the tool page, you must download the package for the version of Sitecore that you are upgrading from. This file contains the clean-up tool.

Since I’m upgrading from 9.3, I choose Sitecore 9.3 XP.

  • Download the Sitecore.UpdateApp 1.3.1 for Sitecore 9.3.0 rev. 003498 (XP).zip

sitecore-upgrade-updateapp-tool-default-items-cleanup-3

 

  • Extracted the content to C:\Sitecore_103_Upgrade\Sitecore.UpdateApp

sitecore-upgrade-updateapp-tool-default-items-cleanup-4.png

  • Copy the license file to the Data folder of the tool 
    • C:\Sitecore_103_Upgrade\Sitecore.UpdateApp\Data\license.xml.

sitecore-upgrade-updateapp-tool-default-items-cleanup-5

  • Update the databases (cloned or actual – depends upon how you are upgrading) in the ConnectionString file
    • C:\Sitecore_103_Upgrade\Sitecore.UpdateApp\App_Config\ConnectionStrings.config

<add name="core" connectionString="Data Source=(local);Initial Catalog=[Your_Project]_Core_Clone;User ID=coreuser;Password=[Your_Password]" />

<add name="security" connectionString="Data Source=(local);Initial Catalog=[Your_Project]_Core_Clone;User ID=securityuser;Password=[Your_Password]" />

<add name="master" connectionString="Data Source=(local);Initial Catalog=[Your_Project]_Master_Clone;User ID=masteruser;Password=[Your_Password]" />

<add name="web" connectionString="Data Source=(local);Initial Catalog=[Your_Project]_Web_Clone;User ID=webuser;Password=[Your_Password]" />

<add name="experienceforms" connectionString="Data Source=(local);Initial Catalog=[Your_Project]_ExperienceForms_Clone;User ID=formsuser;Password=[Your_Password]" />

Sitecore Modules

Sitecore Downloads: Resource files for Modules

Add the upgrade resources from every module and connector to the UpdateApp Tool files.

Note: If your solution does not contain any modules or connectors, skip this step.

I downloaded the Sitecore Headless Services and SPE modules for my project.

sitecore-upgrade-updateapp-tool-default-items-cleanup-6

 

Note: 

If the module or the connector has several versions, there are separate folders for each version.

  • Unpack the zip file into a local folder
    • C:\Sitecore_103_Upgrade\ModulesUpgradeResources\[Module Name].

sitecore-upgrade-updateapp-tool-default-items-cleanup-7

  • Copy all the subfolders and files from the Data folder.

    • C:\Sitecore_103_Upgrade\ModulesUpgradeResources\[Module Name]\X.X.X\Data.

  • Paste all the subfolders and files into the UpdateApp Data folder.
    • C:\Sitecore.UpdateApp\Data.
  • Repeat this procedure for every module and connector.
  • Open a Command Prompt in the tool folder and run: Sitecore.UpdateApp.exe clean

sitecore-upgrade-updateapp-tool-default-items-cleanup-8

  • Review the logs, to make sure all items are cleaned up.

    • C:\Sitecore_103_Upgrade\Sitecore.UpdateApp\Data\logs

sitecore-upgrade-updateapp-tool-default-items-cleanup-9

  • To clear the caches, open the <instance_url>\sitecore\admin\cache.aspx page,
    click Refresh, and then click Clear all.

 

Troubleshooting

1. Exception: Execution Timeout Expired

sitecore-upgrade-updateapp-tool-default-items-cleanup-10

If you receive this error, increase the SQLTimeout in Sitecore.config of Sitecore.UpdateApp Tool.

The default is 5 minutes, increase it to 30 minutes and run the UpdateApp Tool again.

   <setting name=”DefaultSQLTimeout” value=”00:30:00“/>

sitecore-upgrade-updateapp-tool-default-items-cleanup-11

 

2. The type initializer for ‘Sitecore.SecurityModel.License.LicenseManager’ threw an exception.

Verify that the correct license file is copied to the Data folder of the tool.

 

3. System.InvalidOperationException: Connection string is empty. Name: ‘<database name>’

Verify that the ConnectionStrings.config file is in the App_config folder of the UpdateApp.The content contains the correct connection strings.

If you do not use a separate security database, the security connection string must have the same value as the core connection string.


In the next blog, we will talk about the Sitecore Upgrade: Database Scripts.

Hope this helps. Happy Sitecoring!

2