Take the 2-minute tour ×
SharePoint Stack Exchange is a question and answer site for SharePoint enthusiasts. It's 100% free, no registration required.

We have a content database on our live moss server. It contains one site collection with several sub-sites. I'm using the stsadm export command to produce a cmp file, then moving this to our test server in a different farm.

I then want to import this content into the content database on our test farm, using the import stsadm command results in me being left with all the existing test data as well as the live data. I tried detaching the existing content database from test in central admin and creating a new empty one,to the then run the import against that but the import failed as obviously there's not root site in the empty db.

Can anyone suggest a good approach to this type of problem?

share|improve this question
add comment

5 Answers 5

I would either backup the whole site collection (backup/restore) and use the overwrite switch, or if you must you export/import, delete the test site and then create a new blank site. Then you can import your data into the blank site and there shouldn't be any problems.

share|improve this answer
add comment

Probably all your missing here is the awareness that STSADM -o import needs an existing site collection to import to. Likewise if you were importing a list (not possible with STSADM, but is with the underlying API) it needs the parent web present to import into.

If you don't want the imported data to sit alongside test data, you either need to delete and recreate the site collection, or else leave the original and create a new separate site collection to import into.

There's no specific need to create a new content database unless you wish to for other reasons.

share|improve this answer
add comment

One of the easist ways for moving site collections between environments, especially if they are in a dedicated content DB, is by copying the DB between the production and test SQL servers.

This assumes you have access to the Database servers for both environments. I found this is often quicker and easier than export/import but it is an all or nothing strategy. As long as you are happy to move the entire site collection from production to test then it will work and the following TechNet article outlines the process:

http://technet.microsoft.com/en-us/library/cc262792.aspx

share|improve this answer
add comment

You have a project on Codeplex which might help you

http://www.codeplex.com/SPDeploymentWizard

share|improve this answer
add comment

I suppose in addition to these suggestion you could use a content migration tool such as the products supplied by RepliWeb, AvePoint or Metalogix amongst others.

These are not necessary for this one instance but if this requirement becomes common place then it may be worth looking at these kinds of solutions.

share|improve this answer
add comment

Your Answer

 
discard

By posting your answer, you agree to the privacy policy and terms of service.