Using STSADM to Move and Back Up Site Collections


The STSADM utility comes installed with Windows SharePoint Services and allows for a great deal of SharePoint functionality. STSADM can import templates, create sites, change settings, and move data. Unlike backing up and moving data with a program such as FrontPage (discussed in Lesson 24, "Backup Strategies"), STSADM must be run from the server on which SharePoint is installed.

CAUTION

Take great caution when using the STSADM utility because it can perform a myriad of tasks in SharePoint, such as deleting sites and modifying database information. Be sure to test your data migration in a lab setting before running it against a production environment.


To back up a site collection using STSADM, perform the following steps:

1.

From the server that has Windows SharePoint Services installed, open the command prompt by going to Start, Run and then typing cmd.exe into the Open box and click OK.

2.

Type the following into the command line box:

 cd \Program files\common files\microsoft shared\web server extensions\60\bin 

3.

Type in

[View full width]

stsadm.exe o backup url http://servername/sitecollectionname -filename C: \BackupLocation\SiteCollectionBackup.dat

Note that servername is the name of your server, sitecollectionname is the top-level site in a collection, and c:\BackupLocation is the directory where you want the backup file to be saved, similar to what is shown in Figure 25.1. Also note that a site collection, although by default appears under the /sites virtual directory, can also be at a different level on your SharePoint site.

Figure 25.1. Backing up a site collection using STSADM.


TIP

You have many options available with the STSADM tool. To see these options, type stsadm -?.


The advantage in backing up a site collection using this technique is that it can be scripted or run from a batch file.



    Sams Teach Yourself Microsoft SharePoint 2003 in 10 Minutes
    Sams Teach Yourself Microsoft SharePoint 2003 in 10 Minutes
    ISBN: 672327236
    EAN: N/A
    Year: 2004
    Pages: 181

    flylib.com © 2008-2017.
    If you may any questions please contact us: flylib@qtcs.net