Saturday, February 23, 2008

"Failure decompressing data from a cabinet file" Error while creating saving site as a template

This follows from my previous blog post. This error "Failure decompressing data from a cabinet file" can be avoided by using the stsadm command line tool of MOSS 2007 and using the "nofilecompression" attribute.For example to export a site template, you would use something like this:

  • stsadm.exe -o export -url http://intranet/test -includeusersecurity -nofilecompression -filename C:\backup

Once you finish your export use the stsadm import command with the same nofilecompression attribute. For example:

  • stsadm.exe -o import -url http://intranet/test -includeusersecurity -nofilecompression -filename C:\backup

Wednesday, February 20, 2008

How do i resolve this error "The site is too large to save as a template. The size of a template cannot exceed 10485760 bytes." in MOSS 2007

I get asked quite commonly about increasing the maximum size of List Templates (Saving a list as a template is an easy way of transferring data from one place to another in SharePoint). The quick trick here is as follows :

stsadm -o setproperty -propertyname max-template-document-size -propertyvalue 350000000

Note that:
  • The above increases the maximum size of both site and list templates.
  • The propertyvalue parameter is in bytes, so the example above will increase the maximum size to approx 350MB.
  • Default value is 10 MB or 10485760 bytes
  • There is a hard limit of 500MB so the value must be less than 524288000 or you will get an error when saving the list as a template.