Question

I am in the process of staging an upgrade of our 5.1 website to the latest version.

I have a question regarding this step in the documentation. I am not making any new changes to the database. I just need an upgrade. I ran the Project Manager in the staging machine, and noticed the configuration files were updated. I did not copy the db locally. Should I do anything with the files in ~/App_Data/Sitefinity/Configuration?

Source: http://www.sitefinity.com/documentation/documentationarticles/upgrading-you-sitefinity-5.1-project-to-the-latest-version

... If you want to replace your production website and database with the locally upgraded files, package your upgraded website and its database and deploy them on your production environment. For more information, see Deployment.

If you want to merge the locally upgraded website with the production website without replacing the database, perform the following:

Package the upgraded website without the configuration files from ~/App_Data/Sitefinity/Configuration. Do not include the locally upgraded database. ...

Can someone point me in the right direction? Thanks.

Was it helpful?

Solution

This is how the upgrade works:

The project manager updates the DLL files in the bin folder. You need to recompile your solution so that the SitefinityWebApp.dll uses the updated dll references.

When you then run the site for the first time, the Upgrade procedure kicks off which goes and updates the .config files. It also updates the Database, several tables, could be many by:

  • changing the DB schema, e.g. adding a new column to an existing table, etc. This is usually triggered by different modules, e.g. News
  • updating the sf_schema_vrsns table with the new version - the values in this table must match the versions in your config files.

Now, when you have the upgrade completed on staging or dev environment and you tested it and want to upgrade your Live environment to the new versions these are your options:

  1. Copy all project files from dev to live (including Bin folder, web.config, .config files, etc.) AND restore the DB from Dev to Live. This is OK if no changes were made to the live site since the last backup was taken from there, which is NOT your case. During the DB restore the site will not be accessible

OR

  1. Copy all DLL files from the Bin folder of Dev environment (including SitefinityWebApp.dll) to the Live Bin folder. This will restart the site and when it runs for the first time after that it will see that the dll version is higher than the one in the config files and the DB and will kick off the upgrade procedure. This means - it will update the config files and the DB, as described above. DB update could take some time depending on how old is your old version and how new is the new version, but usually it is fairly quick. Also, the size of the DB matters, for instance upgrading to 6.3 had a task to update all records from the sf_object_data table and in our case they were hundreds of thousands and it was doing some other LINQ calculations, etc. so it can take some time if you have a DB of 10GB for instance. During the upgrade of the DB the site will not be accessible. Note, that not all of the DB upgrade tasks are blocking - this means that only the most important tasks need to execute before the site is accessible. The long running upgrade tasks are usually done in the background (as a scheduled tasks in sf_scheduled_tasks table) so the site can be accessible in the meantime.

OTHER TIPS

I think when you upgrade the Sitefinity 5.1 to latest version, you no need To change database. Because it just update the assembly file and dll in the bin folder.

You can read more info at: http://docs.sitefinity.com/upgrade

Licensed under: CC-BY-SA with attribution
Not affiliated with StackOverflow
scroll top