Move MOSS 2007 from test to production

I get this question quite often and frankly speaking there is no one way of doing it. This is what I do in my environment....


Note: this process can also be followed in case of Migrating the MOSS farm from 1 server to another. Of coarse you can also to a full farm backup and restore using the Central Admin UI.

The best and fastest way that I find is content DB attach and detach mode. Usually you will not have any change in the Search / SSP DB and User Profiles in test. Hence no point moving them, however, if you do have any changes to profile / search config you have to move the SSP and Search DB as well.


Here is how you do it (Before doing anything take a full backup from Central Admin on both test and production site):

1. On the Test Box make the site Read Only (http://<YourCentalAdminURLHere>/_admin/sitequota.aspx)

Make sure you select Read Only Option (If you want the site to be at least accessible to users, else choose No Access)

2. From command prompt run the stsadm command with –preparetomove switch (TechNet)
stsadm -o preparetomove -contentDB <database_server:database_name> (If your DB server and the application server are on the same box you can omit the <database_server:database_name> or any of -databaseserver switch mentioned below)

3. Then use the –deletecontentdb switch to detach the DB from the site collection (TechNet)
stsadm -o deletecontentdb -url http://computername -databasename

4. Go to SQL Server and backup (FULL) the DB

5. Go to production Server

6. Make the production site Read Only and follow the above mentioned step 1 - 3

7. From SQL Server Management Studio – Restore the DB (you have to overwrite the existing DB of course!! )

8. Go to command prompt and use –addcontentDB to attach the DB to the existing Site Collection (TechNet)
stsadm -o addcontentdb -url <http://backupservername:port> -databasename <ContentDBName> -databaseserver <NewPrincipalServer>

9. You have custom webpart or site definitions that you have deployed in the Test box you have re-deploy them in the production in the _Layouts and the GAC or BIN as the case may be.

If you want to move the SSP (almost never done in such cases) – detach the SSP DB from SQL Management Studio (full backup and restore will also do) and restore / attach on the production server. Then run the –editssp switch (TechNet)

stsadm –o editssp –title <SSPName> –ssplogin <username> –ssppassword <userpassword> -sspadminsite <newSSPDatabaseServerName>

Hope this helps.

This posting is provided "AS IS" with no warranties, and confers no rights.

Comments (5)

  1. I get this question quite often and frankly speaking there is no one way of doing it. This is what I

  2. dpwebs says:

    When I enable read only on production server, will I be able to accept incoming deployment jobs?

  3. Maurice Abd says:

    Dear Sir,

    I am about to move a MOSS 2007 server to another better-specs server, shall I follow the above steps ? or there could be some additional things to do ?

  4. If you are moving to a better hardware and i am guessing its 64 bit, considering the fact that future version of MOSS runs on 64 bit only, you are better off taking a full backup using sharepoint central admin and restoring it on your new server. that way your Index is also restored. If you are not moving the SQL, you can also do the following:

    ** Run PSCONFIG on old server and remove the central admin site from there

    ** Introduce the new server to the present Farm by running PSCONFIG on the new box and choosing to host the central admin site there

    ** Run PSCONFIG on the old box again and detach it from the farm.

    Hope this helps.

Skip to main content