0

I need to restore a site "Sales" within same web application. Here is what I did?

  1. Created a backup of "Sales_DB" using sql management studio. http://intra.df.suz/Sales
  2. Created a new database "Sales_US" using sql mgmt studio
  3. Created a managed path "SalesUS" with explicit
  4. Ran stsadm -o addcontentdb but it gives following error http://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.

1
  • What you want to achieve? You want make a copy of your existing site collection(not subsite) to different path?
    – Waqas Sarwar MVP
    Commented Jan 14, 2015 at 19:48

2 Answers 2

0

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.

2
  • 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.
    – Morgan
    Commented Jan 14, 2015 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.
    – Morgan
    Commented Jan 14, 2015 at 18:30
-1

Try this:

Create an new Site collection with the URL/Path that you want ['http://intra.df.suz/SalesUS'] (...assuming it is created with a ContentDB named [SalesDB_To_Delete.mdb])

Using powershell: Mount-SPContentDatabase -Name 'Sales_US' -WebApplication 'http://intra.df.suz/SalesUS'

Next:
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.

Good luck.

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge you have read our privacy policy.

Not the answer you're looking for? Browse other questions tagged or ask your own question.