Backing Up SharePoint Sites with Templates

Another technique for backing up and restoring information in a site is to save that site to a site template and then use that template to create a new site. This technique is convenient because it allows you to restore a site to a new location.

CAUTION

The downside to backing up sites using templates is that there is a hard limit of 10MB for a site template file. If your site is larger than 10MB, you will not be able to use this approach.


Backing Up a Site to a Template

To back up an existing site to a template so that it can be restored elsewhere, perform the following steps:

1.
From the site home page, click on Site Settings on the top link bar.

2.
Under the Administration section, click on Go to Site Administration.

3.
Under Management and Statistics click on Save Site as Template.

4.
Enter a filename for the STP file and a title and description for the template file. To fully back up the site, you also need to select the Include Content check box, as shown in Figure 19.8.

Figure 19.8. Backing up a site to a template file.


5.
Click OK to finish the procedure.

Restoring Site Templates

After you have saved the site as a template, you can use that same template to restore the site to a different location. In addition, you can transfer the STP file to another server running Windows SharePoint Services and restore it to that server.

To import a site template into the template gallery of a SharePoint server, run the following command from the command prompt of the SharePoint server:

							Stsadm –o addtemplate –filename c:	emplatefolder	emplatename.stp –title "Title of
 the Template" –description "Description of the Template"
						

Remember to replace the title and description with one pertinent to the site itself. After performing this step, the IIS services need to be restarted, which can be done by typing iisreset at the command prompt.

CAUTION

Running iisreset temporarily cuts off access to the SharePoint sites.


After the template is installed on the server, it can be viewed by typing the following:

							stsadm –o enumtemplates
						

If the template needs to be modified, it must be deleted first, via the following syntax:

							Stsadm –o deletetemplate –title "Title of the Template"
						

Once deleted, IIS must be restarted again, and the template can be imported again via the previous steps. This process is also useful when creating default site templates for a portal.

..................Content has been hidden....................

You can't read the all page of ebook, please click here login for view all page.
Reset
18.223.206.69