[Webinar] Streamline your web hosting managementRegister Today

  • Status: Solved
  • Priority: Medium
  • Security: Public
  • Views: 772
  • Last Modified:

Copy production Sharepoint server to a test server


I am trying to copy a production sharepoint server/db {wss 3.0 v12.0.0.4518/sql2005} to a test lab.  

  Sharepoint -->  Sharepoint-test
  Sharepointdb -->sharepointdb-test

I used stsadm to create a full backup {stsadm -o backup -dir \\someserver\someshare -backupmethod full} and after a little messing around I was
able to get it to finish without errors.   The strange part of this is the backup file is only 5 gigs, but I was expecting something close to 100gbs.  More specifically, the production sharepoint server only has 50gb's free at the moment...and when I tried to save the backup to the local drive stsadmin threw an error saying that it would need 100gb's for the backup.

So assuming my 5gb backup is good {just testing for now},  I setup a test sp box and sp db.   I ran the restore using stsadmin.    When I looked at the web application list, it was showing the restored applications with the production urls.   Will this impact the production environment?   If so how do I go about fixing this?

At this point I know I will prob need to rebuild the test environment, but in the end I need to have a copy that is as close to the production version if possible.   What is the best way to approach this?
1 Solution
Make sure you update your alternate access mappings on the test environment.  Goto Central Admin -> Operations -> Alternate Access Mappings and update these to point to your test urls.

Also ensure that your IIS and DNS settings are correct to point traffic to the test servers / sites.
I recommend you use the SharePoint administrative toolkit v 4.0.  It come with tools to move site collections from farm to farm.  It has a lot of documentation with it as well.  It is what I use.  If in that excercise you have a specific question, put it out there and good luck!
  • On the old farm, disconnect the content DB for the portal you want in central admin under manage web applications, content DB. (Note the name of the DB before you disconnect it)
  • Find the DB in SQL manager and detach it. Copy to a USB stick or drive
  • List any 3rd party web parts you installed and copy the installs for those to the usb stick / drive. If you don't know you can look at Farm Features / Solutions
  • Go to the Server with the new Farm.
  • Install the custom web parts if you had any
  • Create a new web application on the new farm using the new URL you want to use (Make sure you have created it in DNS prior to creating the new web app)
  • Once created, delete the new content database
  • Copy the old DB to the new SQL server and restoreit using the new name you want to use
  • Make sure the SharePoint account you used to install the farm has rights to the database you just attached
  • Attach the database to the newly created web app using the STSADM command
    stsadm -o addcontentdb -url -databasename [-databaseserver ] [-databaseuser ] [-databasepassword ] [-sitewarning ] [-sitemax ]


fertigjAuthor Commented:
Thanks...  I followed the procedure listed in the last comment and everything went as expected.   The only problem that i have to solve yet is there are some links on the test site that still refer to the production site.

Featured Post

Take Control of Web Hosting For Your Clients

As a web developer or IT admin, successfully managing multiple client accounts can be challenging. In this webinar we will look at the tools provided by Media Temple and Plesk to make managing your clients’ hosting easier.

Tackle projects and never again get stuck behind a technical roadblock.
Join Now