Home » Sharepoint

Create a lab environment copy of my existing Sharepoint 2007 environment

First, I'm torn between posting this in the SQL forums, or in the Sharepoint forums.  I think it's right for it to be here, but if someone needs to move it, feel free.

We have been using Sharepoint 2007 for a few years now.  Unfortunately, we never setup a lab environment for development, update testing, etc.  My task now is to do just that.  Ideally, I'd like to create a mirrored (using the term loosely) copy of the existing databases on a new server.  My hope is that I can run patches and solution installations against this copy, and then test, etc.

Initially, I figured I'd just setup database mirroring, or copy the databases from one server to the other, but neither of these seem to be the way to go.  Mirroring fails on databases that aren't set to FULL recovery mode, and copying tends to throw errors about default schema clauses and other ____.

Again, maybe this is a SQL question.  But, the more I think about it, I wonder if a direct copy of the sharepoint databases is a good idea, or even possible.  Do databases such as 'Sharepoint_Content' contain instance-specific entries that would cause the sharepoint site to fail, if it were attached to a different server?  If I only copy the beefy 'WSS_Content' database for the main sharepoint site, will I still have all the solutions installed for the farm?  (I think the answer to this is no, but I pose it anyway.)

So to put it mildly, how can someone make a copy of an existing sharepoint site?  Does anybody know of a blog or guide that describes doing just this?  I've been unable to find much thus far.  Any help would be appreciated!

Gabriel Matthews


4 Answers Found


Answer 1

Please read relevant articles in from this hub: http://technet.microsoft.com/en-us/library/cc288664(office.12).aspx ;


SharePoint content databases does not contain instance specific data, you can backup and restore them to database server in new SharePoint farm and then attach them to web application in new SharePoint farm. SharePoint Configuration database and Central Administration content database contain instances specific data, so, you usually create new farm for test environment. And if you only copy the content databases, solutions you installed on the production farm will not appear in the new farm, you have to install them in the new farm.


An alternative is to use Physical-to-Virtual (P2V) technology to create an exact copy of your SharePoint farm in virtual machines for testing. Please read the following articles for detail:






Gu Yuming

TechNet Subscriber Support in forum

If you have any feedback on our support, please contact tngfb@microsoft.com


Answer 2

You can use the commands w/ their correct parameters to backup and restore a site collection.

stsadm -o backup

stsadm -o restore

So long as the features in the old environment are all present within your new environment they should be identical.

This is very helpful for development because whenenver there is an error on staging, all that needs to be done is to take a site backup and restore it to development and walk through the code in the debugger.


Answer 3

I just wanted to add that with regard to content, your SharePoint "site" data is effectively all stored within its content database(s).

You can determine which database(s) are assigned to a Web application by navigating to Central Administration > Application Management > Content Databases.

Migrating the database is relatively straightforward depending on the size of your application - in our case we simply migrated the most recent full SQL backup to our testing environment and restored it to the backup farm.

I'm not sure what you mean by "copying" - if you have attempted to restore a full DB backup already unsuccessfully the schema error could mean that your test farm is not patched to the correct version of SharePoint. Note that in my experience I've found that hotfixes as well as service packs need to be identical to allow for a successful DB restoration.

Assuming your site uses AD authentication and you are planning on using a separate "test" domain, note that your permissions will effectively be broken in the restored site as the SIDs will not exist in the test domain. Depending on your requirements, you can obviously get around this by adding a test administrator account as site collection admin for each collection - or script that depending on how many you have within your Web application.


Answer 4


I am recently involved in the same task, just want to check if you have done with yours. Any recommendation from your side to accomplish mine? what is the steps you have followed to build the lab invironment?


Many thanks in advance.



<< Previous      Next >>

Microsoft   |   Windows   |   Visual Studio   |   Sharepoint   |   Azure