stsadm export/import vs Backup/Restore vs ExportWeb

on Wednesday, February 24, 2010

There are 4 ways to Backup/Restore different sharepoint entities.

  1. stsadm export/import:
    • You can import single web(including all subwebs) using export method. 
    • It can also export sitecollection and webapplication as well.
    • It exports data using Object Model and generated new GUID for every object.
    • It does not copy any information related to workflows. If import creates new lists and a workflow was associated to them, you must recreate it manually. Additionally, it does not copy workflow history and tasks lists. 
    • You can run import operation on the same content database from which the export of the web was done as all the GUIDs are generated again, which you can't do in backup/restore.
    • It also activates all the features.
  2. ExportWeb method(sites.asmx web service Object Model):
    • You should use this method if you would want to backup only single subweb without any child subwebs.
    • public int ExportWeb (string jobName,
          string webUrl,
          string dataPath,
          bool includeSubwebs,
          bool includeUserSecurity,
          bool overWrite,
          int cabSize)
      The file name to use for content migration packages.
      The URL of the site to export.
      The directory location where content migration packages are placed.
      true to include subwebs; otherwise, false.
      true to include site security groups and group membership information; otherwise, false.
      true to overwrite the content migration package if it exists; otherwise, false.
      Indicates the maximum size for the CMP (content migration package) file.

  3. Content Deployment

    • Content deployment copies content from a source Microsoft Office SharePoint Server 2007 site collection to a destination site collection. The entire source site collection can be copied (full), or a subset of sites can be copied (incremental). In either case, content deployment is incremental by default, deploying only changed pages and related assets (such as images). You can also do a full deployment of all content; however, you should only run a full deployment job on an empty site collection. Also, a Quick Deploy feature supports deployment of a single page by authors.
  4. Central Admin Backup/Restore(stsadm -backup/-restore):

  • You can backup sitecollection,webapplication,farm using this.
  • It keeps every GUIDs except one (and the most important): when you restore the file, it generates a new GUID for the site collections.
  • This was done on purpose because Sites table of configuration database uses SiteID as primary key.
  • This is very important because it allows you to restore the backup in the same farm in which you did the backup. You can even restore the same backup several times in the same farm, but you must always restore in a different content database, because all others GUIDs remain unchanged.
  • This operation is probably more designed for SharePoint administrators that want to backup data. Because it does not do anything else than dumping the SQL content database, dministrators can be sure no data will be changed, transformed or lost.
  • Any Custom solutions deployed (be sure to keep the solutions so they can be easily re-deployed).
    • Alternate access mappings
    • The Central Administrator Web Application
    • The Central Administrator content database
    • The Internet Information Services metabase


Reed N Carr said...

If you need to recreate a site collection top level site as a subsite, simply saving it as a site template and checking the "include content" option will allow you to add that site template with content to another site template document library, and replicate the site in another site collection or a different location within the same site collection. To recreate, you need to create a new site in the browser selecting the site template you imported from the custom template tab.