Today I wanted to move the site collection to a new site
collection with new URL in same web application. I got error the following errors
Restore-SPSite : The operation that you are attempting to
perform cannot be completed successfully.
No content databases in the web application were available to store
your site collection.
The existing content databases may have reached the maximum number of
site collections, or be set to read-only, or be offline, or may already
contain a copy of this site collection. Create another content database for the Web
application and then try the operation again.
At line:3 char:1
+ Restore-SPSite http://careerscentral.cag.local/departments/test1/
-Path E:\Backu ...
+
~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
+
CategoryInfo : InvalidData:
(Microsoft.Share...dletRestoreSite:SPCmdletRestoreSite) [Restore-SPSite],
InvalidOperationException
+
FullyQualifiedErrorId : Microsoft.SharePoint.PowerShell.SPCmdletRestoreSite
Reason: The old site collection is a publishing site
collection and GUID is in conflict in the Content Database.
Workaround : used the following stsadm command instead of
powershell it worked !!!
Other thing is you need to check if you have corrupt or orphan features, Use feature removal tool to clean the site collection prior to copying.
Other thing is you need to check if you have corrupt or orphan features, Use feature removal tool to clean the site collection prior to copying.
Following commands fixed my problem.
Export publishing
site first:
stsadm -o export
-url http://oldsite -filename
oldsite.cmp
Create a new site at
the target location
Now import the site
over the top of the blank site:
stsadm -o import -url
http://newsite -filename oldsite.cmp
..\3 days later I resolved my issue, it was related to Corrupt feature. In sharepoint 2013 we now have a new PowerShell commond to directly copy from site collection to other site collection as follows.
Copy-SPSite -Identity http://oldsite -Destination database db -TargetUrl -http://newsite
This should fix all kinds of problem.
And moves the site collection from old site to new site in same web application.
No comments :
Post a Comment