Share via

Backup and Restore SharePoint site collection from one Farm to another Farm using STSADM commands

We will be getting scenarios where we need to move the site collecitons from FARM to another FARM with in the Environment.

We need to keep in mind some of the Prerequisites for this

1. FARM Path level should be Same

2. Soluitons Deployed for the Web applications or sites should be avilable in the Target FARM

3. The account with which we are doing this TASK should be FARM account or Service account which has DBO rights on SQL server

4. Check the Database is not read only.

Server Name: Contoso
Source Site Collection URL:
Source Site Owner: Contoso\Administrator.
Goto the Command prompt and Change the Directory to below
%Program Files%\Common Files\Microsoft Shared\Web Server Extensions\12\Bin\
Take backup using following command:

 stsadm.exe -o backup
     -url <url>
     -filename <filename>

STSADM.EXE –o backup –URL -filename “contoso.bak”

Now we need to restore this to another FARM:
Login to the Server with Service account which has Admin rights on the Server and DBO Rights on SQL server so that we can write to the Database.

On the Destination Server:
Server Name: Tailspintoys
Target Site Collection URL:
Service account: Tailspintoys/Administrator
Create New Web Application from Central Administration
Now restore using STSADM command
YOu can use the below Syntax

stsadm.exe -o restore
    -url <url>
    -filename <filename>
    [-hostheaderwebapplicationurl <web application url>]

STSADM.EXE –o restore –URL -filename “contoso.bak”

If you already have a site collection with Blank Template on this web applicaton you can use the -Overwrite switch

Change the site collection owner of this newly restored site