Partilhar via


Some key differences between stsadm export and backup operations

It's not obvious to understand key differences between a backup and an export. Although they are both designed to backup data, they work completely differently.

Stsadm –o backup/restore

With the URL and filename parameters, it allows you to backup either a site collection or web application. You can basically consider the file generated more or less as a SQL dump of (a part of) your content database.

It preserves the GUID of every object except the GUID of the Site: when you restore the backup, SharePoint generates a new GUID for the site collection.

This was done on purpose, among others things because Sites table in configuration database uses SiteID as the 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 the GUID of every other object remains unchanged.

This operation is designed to take an exact copy of a site collection, no data will be changed, transformed or lost.

Stsadm –o export/import

This is the only standard operation (not talking about possibilities with custom code) that allows you to backup data of a sub site (SPWeb object), but it can also export a site collection, an entire web application, or a single list. It generates a new GUID for every objects such as sites, sub sites, lists and items.

Another difference is that you can restore the content in an existing site, the behavior with existing data is defined with the parameter updateversions in import operation.

A major drawback of this operation is that it does not preserves workflows instances, associations, history and tasks. Every workflow association must be recreated and there is no way to restore the running instances from original site.

Contrary to the backup operation, it does not matter on which content database you run import operation, and you can restore a top site as a subsite, and reciprocally (except for sites with publishing feature where it is not supported: https://blogs.technet.com/b/stefan_gossner/archive/2009/05/27/limitations-of-stsadm-o-export-import-related-to-publishing-sites.aspx).

This operation is good for merging content of sites, and decide how to handle identical data between source and target. Very important, do not forget to use includeusersecurity parameter in both export and import if you wish to preserve information relative to permissions and other properties such as documents authors.

Comments

  • Anonymous
    December 17, 2010
    Good Post !!! really helpful and to the point article

  • Anonymous
    May 03, 2011
    does that mean that sharepoint backup command can at least capture sharepoint standard workflow association (leave the workflow status and task and history)?

  • Anonymous
    May 05, 2011
    Great!

  • Anonymous
    December 24, 2011
    Thanks for  this valuable post really its helped me (Y)

  • Anonymous
    April 17, 2012
    Hi, you wrote: "A major drawback of this operation is that it does not preserves [...] history and [...]." Do you mean the version history of files/items gets lost? But therefore there is the parameter "[-versions] <1-4>", isn't it?

  • Anonymous
    August 18, 2014
    Does Export/Import  move data between farms ?