Export-SPWeb / Import-SPWeb could not find file ExportSettings.xml



Issue

I have encountered an error in the web export/import routine. The thing is that the feasibility of import seems to depend on the state of the web.

I have several subsequent export packages of the same web and say #2 works fine (I can see it extracting the contents of the package and the result is that the web is imported) and #3 fails (I don’t see the files being extracted and the import fails almost immediately).

PS C:\Windows\system32> Import-SPWeb -IncludeUserSecurity -Path C:\Install\exportweb2.bak -Identity https://test.company.com/sites/home -Force

Log file generated: C:\Install\exportweb2.bak.import.log

PS C:\Windows\system32> Import-SPWeb -IncludeUserSecurity -Path C:\Install\exportweb3.cab -Identity https://test.company.com/sites/home -Force

Log file generated: C:\Install\exportweb3.cab.import.log

Import-SPWeb : Could not find file ‘C:\Users\adm_user\AppData\Local\Temp\0cf9aa8f-fc19-401f-a094-0c6cabde6f6b \ExportSettings.xml’. At line:1 char:13 + Import-SPWeb <<<< -IncludeUserSecurity -Path C:\Install\exportweb3.cab -Identity https://test.company.com/ sites/ipms -Force + CategoryInfo : InvalidData: (Microsoft.Share…CmdletImportWeb:SPCmdletImportWeb) [Import-SPWeb], FileN
otFoundException + FullyQualifiedErrorId : Microsoft.SharePoint.PowerShell.SPCmdletImportWeb

The following is logged:

[23.05.2011 10:07:22] Progress: Initializing Import.

[23.05.2011 10:07:22] Warning: Import requirement file C:\Users\adm_user\AppData\Local\Temp\3\9f0699d5-bb0d-4e27-ab44-6d8f534b0271\Requirements.xml was not found no verifications ran.

[23.05.2011 10:07:22] FatalError: Could not find file ‘C:\Users\adm_user\AppData\Local\Temp\3\9f0699d5-bb0d-4e27-ab44-6d8f534b0271\ExportSettings.xml’.

[23.05.2011 10:07:22] Debug: at System.IO.__Error.WinIOError(Int32 errorCode, String maybeFullPath)

at System.IO.FileStream.Init(String path, FileMode mode, FileAccess access, Int32 rights, Boolean useRights, FileShare share, Int32 bufferSize, FileOptions options, SECURITY_ATTRIBUTES secAttrs, String msgPath, Boolean bFromProxy)

at System.IO.FileStream..ctor(String path, FileMode mode, FileAccess access, FileShare share, Int32 bufferSize, FileOptions options, String msgPath, Boolean bFromProxy)

at System.IO.FileStream..ctor(String path, FileMode mode, FileAccess access, FileShare share)

at System.IO.FileInfo.Open(FileMode mode, FileAccess access, FileShare share)

at Microsoft.SharePoint.Deployment.SPImport.DeserializeExportSettings()

at Microsoft.SharePoint.Deployment.SPImport.Run()

[23.05.2011 10:07:22] Progress: Import did not complete.

 

The adm_user account is a local administrator on all the machines in the farm except SQL Server and the SPShellAdmin rights have been granted.

There definitely are the Requirements.xml and ExportSettings.xml inside the package, I checked this with my archiver.

I believe this is rather a common trouble to shoot and any help would be appreciated.

Solution

 

Check the size of your export package. There is a default cab size of about 25Mb – this used to be a limit you had to increase with stsadm by setting a parameter. With the PowerShell Export-SPWeb cmdlet it generates multiple files if you hit the limit. You may need to change this limit using the CompressionSize parameter to set the cab size (up to a maximum of 1024Mb).

Example:

Export-SPWeb http://mysite -Path c:\backup\ExportFile -CompressionSize 1000

 


    Did we save you time and headaches? Buy us some
    cups of coffee. The more coffee we drink the more
    articles we can write.

Leave a Comment Here's Your Chance to Be Heard!