Click here to Skip to main content
15,916,215 members
Articles / Productivity Apps and Services / Sharepoint

STSADM Backup Error: The backup is from a different version of SharePoint

Rate me:
Please Sign up or sign in to vote.
0.00/5 (No votes)
20 Sep 2011CPOL5 min read 37.3K   2   3
Explains an alternative way of stsadm restoration of a Site Collection.


This article speaks about the issues we go through more often than not in doing a restoration of a Site Collection from one version of SharePoint 2010 farm to an upgraded version of SharePoint 2010 farm. This mostly happens in enterprise SharePoint establishments where developers are supposed to develop on one environment, say a development environment, and then move their application to an entirely new SharePoint farm, say a staging or production.


The stsadm as we know gives many SharePoint methods, one of them being the ability to backup your SharePoint site collection (stsadm –o backup –filename <filename> -url <sitecollurl>) and then restore it (stsadm –o restore –filename <filename> -url <pre created empty sitecollurl> -overwrite) to any other SharePoint 2010 farm. So in cases where we try to restore a SharePoint 2010 Site Collection to a SharePoint Farm which is a slightly upgraded one*, the stsadm throws a restore error which reads:

The backup is from a different version of Microsoft SharePoint foundation and cannot be restored to a server running the current version.


And all that we end up saying is "Now what!!!”

Using the code/solution

Well, there are many articles that explain a fix for this, but none of them explain it either in detail or in full. This is what I intent to write on. The solution as it is evident is a SQL Server Backup Restore or better known as Detach Attach SQL Database, instead of a stsadm backup restore. (For the purposes of this article, I will call the latter method “SQL Server Backup Restore”.) But that does not end here, to make sure your Site Collection is properly restored and upgraded, you have to go a step further to do a PowerShell upgrade command.

The steps for executing a SQL Backup Restore of a Site Collection are explained below:

  1. Go to the Central Admin; find out the Content Database where the Site Collection is stored. It should typically be at Application Management --> (under) Site Collections --> View All Site Collections.
  2. 2.JPG

    On this page, select the Web Application where your Site Collection resides and then click on the Site Collection URL in the left. The table in the right should have the Content Database Name where the Site Collection data is stored.

  3. Login to your SQL Server Management Studio; figure the Content Database Name from the list of databases there. Get the backup of your Content Database from the SQL Server Management Studio Backup Wizard.
  4. 3.JPG

  5. Restore your Content Database to the SQL Server that acts as the database server for the upgraded SharePoint Farm. Make sure your SQL databases are of the same version for both the older and upgraded version of SharePoint; for instance, you cannot restore a SQL Server 2008 database backup file to a SQL Server 2008 R2 box.
  6. 4.JPG

  7. Now login to the Central Admin of your upgraded SharePoint farm, create a new Content Database (Application Management--> under Databases --> Manage Content Databases--> Click on Add a Content Database) for the web application where you want your site collection. Make sure the Web Application you choose does not have a Site Collection at the same URL as the one you are trying to restore**. Title the content database the same name as done while restoring your SQL Server backup. And voila!!! Your new Site Collection should be browse-able in the Web Application.
  8. Image 5

  9. However, this does not end here, you probably are able to browse your site collection fine but if you take a closer look, your site collection is just restored as of now but not upgraded. To verify this, go to the Central Admin--> Upgrade and Migration--> under Upgrade and Patch Management --> Click on Review Database Status and you would have your revelation there. If you point to the newly restored content database here, you will find a message that says:
  10. Database is in compatibility range and upgrade is recommended”.


    So effectively if you again try to backup restore this site collection using stsadm, in the same upgraded SharePoint farm, you will have a similar error as you got earlier.

    This is where you need to do an upgrade, using a PowerShell command:

    Upgrade-SPContentDatabase –Identity <name_of_contentDB>

    Once this command finishes its execution, your site collection is now a fully restored and upgraded one.

Points of interest

In a nutshell, this article can be summarized by making a brief comparison of the stsadm way of backup-restore and the SQL Server way of backup-restore.

STSADMSQL Server (as described in the article above)
This allows the Site Collection to be restored at any URL location in the web application (at explicit paths like the root of the Web Application or wildcard paths like “/sites/SiteCollection”).This restores the Site Collection at the exact same URL in the Web Application at which it was backed up from.
This method has a Granularity level of Top Level Sites or Site Collection level.This method has a Granularity level of Content Database, and hence all the Site Collections in the Content Database get shipped with this methodology.
For being able to restore a Site Collection by this method, it does not require creating a New Content Database in the target SharePoint Farm.This mandatorily calls for the creation of a New Content Database in the target farm.
The backup files are usually very small when compared to the one generated by the SQL Server backup. As a simple comparison, where for an stsadm backup of a site collection file weighs 294 KB, the backup file of the Content Database (which contains only one Site Collection) would typically be 23 MB.The backup file size generated is huge.
Does not require access to the database server or SQL Server Management Studio to connect to it.Requires permission on database server as well as SQL Server Management Studio to connect to it.


* In order to see your SharePoint Farm's current version, in Central Admin, go to System Settings --> under Servers --> Manage servers in the farm. Find the version of your farm under Farm Information as title Farm database version.


** One trouble of executing a SQL Server backup restore instead of a stsadm backup restore is that you are not at liberty to restore your site collection at any URL. The former method does a restoration along with the URL of the Site Collection; however, that is not the case of an stsadm backup restore where you are free to choose your URL.


This article, along with any associated source code and files, is licensed under The Code Project Open License (CPOL)

Written By
India India
This member has not yet provided a Biography. Assume it's interesting and varied, and probably something to do with programming.

Comments and Discussions

GeneralMy vote of 5 Pin
piripitsis11-Jul-12 18:18
piripitsis11-Jul-12 18:18 
QuestionCustom WebParts Pin
luisnike1930-Sep-11 11:30
luisnike1930-Sep-11 11:30 
AnswerRe: Custom WebParts Pin
Soptik Dutta1-Oct-11 7:53
Soptik Dutta1-Oct-11 7:53 

General General    News News    Suggestion Suggestion    Question Question    Bug Bug    Answer Answer    Joke Joke    Praise Praise    Rant Rant    Admin Admin   

Use Ctrl+Left/Right to switch messages, Ctrl+Up/Down to switch threads, Ctrl+Shift+Left/Right to switch pages.