When I tried to restore a site collection backup using SharePoint Management Shell,I got the following error:
The site collection backup has been taken from a SharePoint farm that its build number version is not identical to the target SharePoint farm.
First, I checked the patch level of source and destination farm by following:
- Open SharePoint 2010 Management Shell as administrator and type
- The output of the source farm is 14.0.7121.5000.
- Or open Central Administration -> System Settings -> Manage Server In this Farm
- Below farm Info check the Configuration database version.
- Apply the previous command to the destination farm.
- Check this build number table to download the missed CU, then install it in your destination farm.
After I installed the required update to the target farm and now both farms are identical in build number.
I should Check Database Schema Versions before trying to restore a site collection by following the mentioned steps below:
- Open Central Administration
- Navigate to Upgrade and migration section.
- Review Database Status.
- Check the content database of your web application that you want to restore a backup to it.
- Check the status column for each content database and if you found “database is in compatibility range and upgrade is recommended” so you will need to upgrade your database.
- Click on WSS_Content and check the version details.
- 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, run the below command in SharePoint Management Shell.
- After executing the upgrade command,the Current Schema Version is should be equal to the Maximum Schema Version.
- Try again to restore the site collection backup that should be now restored without any issues.
Note: If the site collection size exceed 1GB. The restore operation will take a long time.
So I advise to use SQL Server Backup/Restore operation that mentioned in this article if the site collection size is more than 1GB.
You can also check the following article to restore a SharePoint backup without checking the farm build number.