有三种不同的feature可以用来打包SharePoint的站点:
- 在SharePoint Designer中, 你可以将站点备份
- 在SharePoint Designer中, 你可以创建一个Web package.
- 在浏览器中, 你可以保存一个站点为一个站点模板.
使用哪个取决于你想要完成什么样的功能.
Web Package (.fwp file)
============
当你想要共享或者重用web页面, 或者是站点, 或者是列表结构的时候, 你可以使用这个特性. 使用Web packages, 你既能够打包整个站点也可以选择你想要的特定的页面, 列表, 或者文档库. Web Package是一个很棒的方式来复制站点结构, 但是他们不能包括列表数据, 子站点, 或者安全和权限设置. 还有, 一个web package可以包括自定义的链接条. 你创建了package之后, 你可以import和deploy这个文件到任意多个web sites. 更多信息, 可以参考Export or import a Web package.
Backup and Restore (.cmp file)
============
当你想要做整个站点或者子站点的backup时, 或者当你想要移动整个站点或子站点到另一个服务器或者地点的时候, 你都可以使用这个feature. 与Web package不同, content migration package会包括列表数据, 并且你不能选择仅包含特定的站点元素. 注意, 你会在这个过程中丢失一些自定义(customization)或者配置. 比如说, backup文件不会包含workflow, alerts, 还有在站点集水平存储的属性. 备份文件也不会包括Recycle bin的状态和在其中的对象. 要使用backup and restore, 你必须对站点拥有管理员的权限.
Site Template (.stp file)
============
当你想要创建多个具有相同的基础内容和站点结构的web站点是, 你应该使用这个特性. 比如说, 你也许想让在一个站点里创建的所有的子站点都拥有相同的站点结构, look and feel, 甚至内容. 你可以通过保存站点为一个站点模板, 并把它加入到Site Template Gallery中, 这样的话, 所有人都可以用这个站点作为一个模板了. 与Web packages不同, 站点模板能够包含列表数据. 你必须即拥有你想要创建站点模板的站点的管理员权限, 又要拥有对site template gallery的写权限.
备份站点的步骤
==========
Backing up a Web site requires a location to store temporary backup files. By default, Office SharePoint Designer 2007 uses the current Web site. You can use another site on the same server or a location on another server on the same network — for example, \\Server name\Share name.
If the site that you are backing up or restoring is large, the process can take quite a while.
还原站点的步骤
===========
Step 1: Create a new empty Web site as a destination
- On the File menu, click New.
- In the New dialog box, click the Web Site tab, click General, and then click Empty Web Site.
- In the Specify the location of the new Web site box, enter the location where you want to restore the backup site.
You can restore the site to a different server, and you can restore it as either a new top-level site or a subsite under an existing top-level site.
- Click OK.
小窍门: 为了确定是否有在备份的过程中有错误产生, 你可以查看.log文件. .log文件存储在你用户账户的Temp文件夹下(%temp%). 如果一个日志文件已经存在, 比如说之前的backup and restore留下的, 新的log文件会用不同名字来创建, 比如说smigrate_1.log, smigrate_2.log等等. 在这些文件中搜索下面的关键字:
- cannot
- could not
- failure
- server error
- timed out
- unable to
- the server sent a response.
Step 2: Restore the backup file to the destination
- With the destination site open, on the Site menu, point to Administration, and then click Restore Web Site.
- In the File Open dialog box, browse to and click the .cmp file that you want to restore, and then click Open.
- If the current Web site is low on available storage space, click Advanced, and then do any of the following:
- To store the archive files in another temporary location, enter a new location in the Temporary location for archive files box.
Backing up a Web site requires a location to store temporary backup files. By default, Office SharePoint Designer 2007 uses the current Web site. You can use another site on the same server or a location on another server on the same network — for example, \\Server name\Share name.
- To store the .log file in another location, enter a new location in the Location for import log file box.
You might need to choose another location for the .log file if the server cannot write to the default location. By default, Office SharePoint Designer 2007 creates an import .log file in the current Web site. You can check this file to determine if there were errors during the restore process.
- To store the archive files in another temporary location, enter a new location in the Temporary location for archive files box.
- In the Restore Web Site dialog box, click OK to confirm that you want to restore the .cmp file to the current empty Web site.
If the site that you are backing up or restoring is large, the process can take quite a while.
资料来源:
Back up, restore, or move a SharePoint site
http://office.microsoft.com/en-us/sharepointdesigner/HA100699391033.aspx