Avatar of Neil Randall
Neil Randall
Flag for United Kingdom of Great Britain and Northern Ireland asked on

SharePoint 2010 error when importing an archived site

We have a Top Site with many sub sites (30) and I have started archiving (by exporting/deleting) a number of them using the [Granular Backup] [Export a Site] in SharePoint Central Administration.

I have exported successfully 3 to an external archive storage drive.

I thought it prudent to test that I could import them again, something that we are likely to do in future years.
So, I used the following Powershell command:
PS C:\Users\Admin> Import-SPWeb -identity http://our.sharepoint.co.uk -path G:\SharePoint_Site_Archives\Archived_Sub_Site\Archived_Sub_Site.cmp
This returned a Fatal Error:
Import-SPWeb : Cannot import site. The exported site is based on the template STS#1 but the destination site is based on the template STS#0. You can import sites only into sites that are based on same template as the exported site.
At line:1 char:13
+ Import-SPWeb <<<<  -identity http://our.sharepoint.co.uk -path G:\SharePoint_Site_Archives\Archived_Sub_Site\Archived_Sub_Site.cmp
    + CategoryInfo          : InvalidData: (Microsoft.Share...CmdletImportWeb: SPCmdletImportWeb) [Import-SPWeb], SPException
    + FullyQualifiedErrorId : Microsoft.SharePoint.PowerShell.SPCmdletImportWeb

I assumed that the main Top Site is built using Template STS#0 and that the sub-sites are all based on my customised template STS#1.
So I recreated one of the subsites 'Archived_Sub_Site' from my template empty of any content and added the sub-site \Archived_Sub_Site to my command and also added the -Force parameter:
PS C:\Users\Admin> Import-SPWeb -identity http://our.sharepoint.co.uk/archived_sub_site -path G:\SharePoint_Site_Archives\Archived_Sub_Site\Archived_Sub_Site.cmp
This returned a different error:
Import-SPWeb : A list, survey, discussion board, or document library with the specified title already exists in this Web site.  Please choose another title.
At line:1 char:13
+ Import-SPWeb <<<<  -identity http://our.sharepoint.co.uk/archived_sub_site -path G:\SharePoint_Site_Archives\archived_sub_site\archived_sub_site.cmp
    + CategoryInfo          : InvalidData: (Microsoft.Share...CmdletImportWeb:SPCmdletImportWeb) [Import-SPWeb], SPException
    + FullyQualifiedErrorId : Microsoft.SharePoint.PowerShell.SPCmdletImportWeb

So if a list, survey, discussion board, or document library already exists, I deleted all the entries in the Quick Launch so that it was basically a completley blank web site and ran the Powershell command again.
Same Error:
Import-SPWeb : A list, survey, discussion board, or document library with the specified title already exists in this Web site.  Please choose another title.
At line:1 char:13
+ Import-SPWeb <<<<  -identity http://our.sharepoint.co.uk/archived_sub_site -path G:\SharePoint_Site_Archives\archived_sub_site\archived_sub_site.cmp
    + CategoryInfo          : InvalidData: (Microsoft.Share...CmdletImportWeb:SPCmdletImportWeb) [Import-SPWeb], SPException
    + FullyQualifiedErrorId : Microsoft.SharePoint.PowerShell.SPCmdletImportWeb

How do I get my archived site back into SharePoint so that I can see and use it as I could before I exported and deleted it?

Thanks for your time in viewing this.
Microsoft SharePoint

Avatar of undefined
Last Comment
Neil Randall

8/22/2022 - Mon
ASKER CERTIFIED SOLUTION
colly92002

THIS SOLUTION ONLY AVAILABLE TO MEMBERS.
View this solution by signing up for a free trial.
Members can start a 7-Day free trial and enjoy unlimited access to the platform.
See Pricing Options
Start Free Trial
GET A PERSONALIZED SOLUTION
Ask your own question & get feedback from real experts
Find out why thousands trust the EE community with their toughest problems.
Neil Randall

ASKER
Thanks colly

I have already tried the -force parameter (see 5th paragraph above).

I don't quite understand the logic here (not my first misunderstanding of Microsoft logic).

So, my main site (let's call it sharepoint.mysite.co.uk) is built using template STS#0.
All my child sites within this (and there are about 30) are built using a template I created based on STS#1. All their quick launch links are the same, they all have the same web parts and they are all listed in the top menu as Site 001, Site 002, Site 003 and so on (sharepoint.mysite.co.uk/site001, sharepoint.mysite.co.uk/site002 and so on).

Why can I not just export any of these sites (and then delete them, keeping the main site's top menu tidy), but import them back to exactly where they were exported from?

How much easier this would have been, if when designing SharePoint Central Administration Console they allowed you with a few clicks to import as easily as the console allows you to export!
Experts Exchange is like having an extremely knowledgeable team sitting and waiting for your call. Couldn't do my job half as well as I do without it!
James Murphy