Does Save Site as Template preserve Version History in sp2010?

Posted Thursday, February 11, 2010 4:18 PM by CoreyRoth

It looks like the answer is no.  When you click the Include Content checkbox on the Save as Template page, it looks like only the latest version of documents and lists items are included in the .wsp file.  I ran a few tests and here is what I saw.  Consider the following document with its history from the source site.

SaveSiteSourceDocumentHistory

After I export the site, install and activate the solution on a new site collection and then use the Create Site menu to create a new instance of my site template, only the latest version of the document is there.  Now, I’m not complaining as this is already a great step in the right direction and it really does make moving things around between servers easier. In the screenshot below though, you can see that only the latest version is present.

SaveSiteDestinationDocumentHistory

I’m not really sure why it creates two versions of the document (with different file sizes even), but I am sure there is a reason.  If you haven’t use Save Site as Template, be sure and check it out.  It does export content (including documents). Your documents are packaged up in the .wsp and use the module element to copy them via feature to your document library.  Here is what your package looks like in Visual Studio 2010.

SaveSitePackage

As you can tell from my string of posts lately, I am really excited about the Save Site as Template functionality.  We all would have killed to have it in WSS3.  It really is a great way to see how things are built behind the scenes to using CAML.

Comments

# re: Does Save Site as Template preserve Version History in sp2010?

Tuesday, April 12, 2011 11:00 AM by Neel

Cory,

I am having similar issue in navigation, when I save site as template, for the navigation, i selected - Display the same navigation items as the parent site , when i create a test site using the same template, it resets the navigation to    Display the navigation items below the current site  .. any ideas how to work around

Thank you

Neel

# re: Does Save Site as Template preserve Version History in sp2010?

Tuesday, April 12, 2011 2:35 PM by CoreyRoth

@Neel I haven't ran into that myself.  I assume that setting gets set in the property bag, but I would have to look further into it.

# re: Does Save Site as Template preserve Version History in sp2010?

Monday, June 20, 2011 7:51 AM by Rex

Hi

I'm having the same problem as Neel! But it seems like this is standard SharePoint behaviour. Testing in another SP2010 environment ended in the same annoying result.

Leave a Comment

(required)
(required)
(optional)
(required)