I need to restore a site “Sales” within same web application. Here is what I did?
Created a backup of “Sales_DB” using sql management studio. intra.df.suz/Sales
Created a new database “Sales_US” using sql mgmt studio
Created a managed path “SalesUS” with explicit
Ran stsadm -o addcontentdb but it gives following error intra.df.suz/SalesUS
The attach operation cannot continue because another object in this farm already contains the same ID. Each object in a farm must have a unique ID. In order to proceed with the attach operation you mu
st assign a new ID to this database. To attach this database with a new ID, use the Mount-SPContentDatabase command with the -AssignNewDatabaseId parameter. Note that if this new database and an exist
ing database contain the same site collections, attaching this database will likely result in orphaned site collections due to conflicts between the two databases.
What you want to achieve? You want make a copy of your existing site collection(not subsite) to different path?
– Waqas Sarwar MCSE
Jan 14 ’15 at 19:48
When you take a backup of the site it will keep the GUID. This GUID should be unique, then only the application will work as expected.
Hence what you are trying to achieve will not work.
You can probably try using
Also take a look at this Restore a copy of the same site collection insdie the same web application for detailed answer.
Export-SPWeb does not provide switch to exclude sub webs. I was trying to sites.asmx web services but not sure what string I need to pass to DataPath.
Jan 14 ’15 at 18:29
msdn.microsoft.com/en-us/library/… provide includesubwebs and this can be set to false so I can just restore root and not everything else.
Jan 14 ’15 at 18:30
Create an new Site collection with the URL/Path that you want
(…assuming it is created with a ContentDB named [SalesDB_To_Delete.mdb])
Mount-SPContentDatabase -Name ‘Sales_US’ -WebApplication ‘http://intra.df.suz/SalesUS’
Get-SPContentDatabase -Identity ‘SalesDB_To_Delete’ | Dismount-SPContentDatabase
Do iisreset and browse to the site. Once it works, you may delete [SalesDB_To_Delete] from SSMS
That worked for me.