How to migrate a site from Dev to Live environment? RRS feed

  • Question

  • We need to move a WSS 3.0 site from a development server to a live server, but are having problems getting the results that we need.
    The site contains a number of site columns which were created in the TOP-LEVEL site of the development Sharepoint server. We then created a separate site called "Operations", and created a custom task list on this site called "Workflow". We created a number of content types on the Operations site, each consisting of site columns from the top-level site. We then added these content types to the Workflow list (on the Operations site).
    Having defined the site as above we then took a backup using this command:
    stsadm.exe -o backup -url http://sharepoint_dev:12482/ -filename c:\sharepoint_backUp.bak -overwrite
    On the target live server we had a virgin WSS 3.0 installation in which we had created a top level site called OurCompany. We then tried to restore the development site to it using the following command:
    stsadm -o restore -url http://sharepoint:10347 -filename "c:\sharepoint_backUp.bak" -overwrite
    The above command worked fine, and the site is visible on the live sharepoint server, but all of the site columns on the top-level site have been deleted.
    Could someone please advise on what we have done wrong?

    • Edited by Mike Walsh FIN Monday, July 25, 2011 5:06 PM Ask a question in the Title. Don't push with "Need advice ". Title amended
    Monday, July 25, 2011 3:30 PM

All replies

  • Hi,

    I suggest you that instead of STSADM backup restore use Export import.

    Follow these steps:

    1. Take the export of source site using STSADM export command. refer this:


    2. Create an empty site at the destination via STSADM createsite command. refer this:


    3. Import back using STSADM import command



    If you are providing dedicated content DBs in both environments. Then you can take the backup of the content db in your test environment and then you can restore it in production.

    I hope this will help you out.


    Rahul Rashu


    Monday, July 25, 2011 6:04 PM
  • Thanks for the suggestions. We've exported the site as per the instructions, but have hit a complication when trying to import it. The issue is that somehow the site was set up on the admin port on the original server (devserver:12482). I'm not sure how or why this has happened, but we want to put it on the default port (80) on the target server, and the import process is not allowing us to do this.

    So we exported using the following command:

    stsadm -o export -url http://sharepoint_dev:12482 -filename c:\export20110726 -overwrite

    But were unable to import using the following command:

    stsadm -o import -url http://sharepoint -filename c:\export20110726

    "can only import an administration site only into an existing Central Administration Site".

    Can anyone suggest a way of getting this site off the dev server administration site and onto the default site of the live server (on port 80)?

    Tuesday, July 26, 2011 3:03 PM
  • Hi,

    In this way I would suggest you to take full backup of your content database in your dev environment and copy it to your live environment.

    Then attach this db to the farm. You need to have same managed path as your dev environment for this to  work.

    I hope this will help you out.



    Rahul Rashu

    Wednesday, July 27, 2011 2:09 AM
  • To replicate the same it is recommended to take a Content DB Back up and restore on the Destination Server.
    Thanks, K.R.Senthil Kumar Sharepoint Architect
    Wednesday, July 27, 2011 4:43 AM
  • OK I backed up the content DB from the dev server and restored it to the live server. I then repeated the sharepoint site export/import using thesame method as previously:


    On the dev server:

    stsadm -o export -url http://sharepoint_dev:12482 -filename c:\export20110727 -overwrite

    On the live server:

    stsadm -o import -url http://sharepoint/ops -filename c:\export20110727.cmp
    (the path of this site on the dev server was http://sharepoint_dev:12482/ops)

    I got the same error as before:

    "can only import an administration site only into an existing Central Administration Site".

    The data DID get imported into the new content database on the live server (not the old one), so that part of it appeared to work OK.



    Wednesday, July 27, 2011 11:36 AM
  • Hi,

    when you have restored the content DB you need not do STSADM commands.

    You need to have same managed path and thats all is required.


    Rahul Rashu

    Wednesday, July 27, 2011 12:07 PM
  • when you have restored the content DB you need not do STSADM commands. 
    Sorry - could you please explain what you mean by having the same managed path? How do I do this?
    • Edited by Mike Walsh FIN Friday, August 12, 2011 4:05 PM Full quote wastes space - don't use it
    Wednesday, July 27, 2011 4:11 PM
  • Hi,

    Refer this http://msdn.microsoft.com/en-us/library/bb802766(v=office.12).aspx.

    Every site collection needs to have one. It is of two types explicit and wildcard.


    Rahul Rashu

    Wednesday, July 27, 2011 6:38 PM
  • Thanks for the link. The only two managed paths I can find for the site on the dev server are for the Central Administration site (which is the only web site listed on that server). The managed paths are:

    - Root (explicit inclusion)
    - sites (wildcard inclusion).

    The development site has been set up as a site collection under Central Administration, so when you select the home page for the site (http://sharepoint_dev:12482/ops/default.aspx) you see the following breadcrumb at the top of the page:

    Central Administration > OurCompany Operations 

    On the live server we've set up a "Sharepoint -80" site (this seems to be missing from the dev server). I've added a managed path called "sites" (wildcard inclusion) to this site, to emulate what was on the dev server. I still can't access the site from the live server however, even after importing and attaching the admincontent database from the dev server (which contains our site collection data).

    The URL that I use to access the site collection on the dev server is:

    If I use this URL on the live server (having imported and attached the admin content database from the dev server) I get a 404:

    I know I'm missing something fundamental about the way that sites/collections/paths should be set up, and that the original site collection should not be under Central Administration, but I can't work out how to clean this up when migrating it to the live server.



    Thursday, July 28, 2011 11:01 AM
  • Hi,

    Your site /ops is a site collection in the same web app as of central admin or else it is a subsite under central admin site?

    Can you find this in site collection list in your central administrator?

    In the cases I would suggest you to in your production environment do not create it under same web application.

    1. Try creating a different web application.

    2. Create a managed path.

    3. Create an empty site using STSADM Create method.

    4. Import the exported content of the dev site over here.

    I hope this will help you out.



    Rahul Rashu

    Thursday, July 28, 2011 5:14 PM
  • When I try to import this into an empty site on the live server I get the error below:
    "Cannot import site. The exported site is based on the template CENTRALADMIN#0 but
    the destination site is based on the template STS#0. You can import sites only
     into sites that are based on same template as the exported site."
    I didn't get an option to specify a template when I created the empty site, so how can I work around this?
    Edit: I just tried using STSADM to create an empty site using the CENTRALADMIN#0 template but got an error because a site already existed at that URL (http://sharepoint)

    Friday, July 29, 2011 9:23 AM