Few days
back i was trying to restore a site from staging to production. But i received
the below error.
Error: Restore-SPSite: Your backup
is from a different version of Microsoft SharePoint Foundation and cannot be
restored to a server running the current version. The backup file should be
restored to a server with version '4.2.7.0' or later.
Resolution:
First check the patch level
of your source and destination environment. Make sure your destination
environment is not at lower version than the source. If so , you may need to
patch your environment as same as your source.
In my case ,
source and destination patch version were at same patch level. But when I
checked the database Schema Versions of the database which I am trying to
restore is not upgrade and it was still at the older Version.
Steps to Check Database Schema
Versions
Central Administration àApplication
Management à Manage
content databasesà Select
your database where you want to restore àclick on the DB name à
under “Database Versioning and Upgrade” you can see something like below
Microsoft.SharePoint.Upgrade.SPContentDatabaseSequence
Current Schema Version: 4.1.30.0, Maximum
Schema Version: 4.2.7.0
Microsoft.SharePoint.Upgrade.SPContentDatabaseSequence2
Current Schema Version: 4.1.7.0, Maximum Schema Version: 4.1.7.0
Microsoft.SharePoint.Administration.SPContentDatabase
Current Schema Version: 14.0.6137.5002, Maximum
Schema Version: 14.0.7105.5000
If the Current Schema Version
is less than the Maximum Schema Version, then the database should be upgraded
as soon as possible.
To Upgrade content database,
Execute the below command in powershell.
“Upgrade-SPContentDatabase
<Content_db_name>”
After executing the command,
Microsoft.SharePoint.Upgrade.SPContentDatabaseSequence
Current Schema Version: 4.2.7.0,
Maximum Schema Version: 4.2.7.0
Microsoft.SharePoint.Upgrade.SPContentDatabaseSequence2
Current Schema Version: 4.1.7.0, Maximum Schema Version: 4.1.7.0
Microsoft.SharePoint.Administration.SPContentDatabase
Current Schema Version: 14.0.7105.5000, Maximum
Schema Version: 14.0.7105.5000
Now the database
is upgrade to the version 4.2.7.0 and you can restore without any issues.