locked
Powershell Import-SPWeb problem.... RRS feed

  • Question

  • This is driving me nuts because it's such a simple thing that should just work.  We are trying to export a site from one SC to another. The export works fine.   Here is the command I used:

    PS C:\Users\x> Export-SPWeb http://myteam.company.com/is/issites/ism/ -Path d:\ism\ism2.bak -IncludeUserSecurity -IncludeVersions All -NoFileCompression

    Here are some of the commands we’ve used to try to restore.  Note that we've done SEVERAL exports with different parameters and such which might explain the differences.:

    PS D:\> Import-SPWeb -Identity "http://myteam.company.com/ismgmt" -Path "d:\ism\ism2.bak"

    Import-SPWeb : The file d:\ism\ism2.bak does not exist.

    At line:1 char:13

    + Import-SPWeb <<<<  -Identity "http://myteam.company.com/ismgmt" -Path "d:\ism\ism2.bak"

        + CategoryInfo          : InvalidData: (Microsoft.Share...CmdletImportWeb:

       SPCmdletImportWeb) [Import-SPWeb], SPException

        + FullyQualifiedErrorId : Microsoft.SharePoint.PowerShell.SPCmdletImportWeB

    PS C:\Users\x> Import-SPWeb -Identity http://myteam.company.com/ismgmt/ -Path d:\ismnew

    Import-SPWeb : The file d:\ismnew does not exist.

    At line:1 char:13

    + Import-SPWeb <<<<  -Identity http://myteam.company.com/ismgmt/ -Path d:\ismnew

        + CategoryInfo          : InvalidData: (Microsoft.Share...CmdletImportWeb:

       SPCmdletImportWeb) [Import-SPWeb], SPException

        + FullyQualifiedErrorId : Microsoft.SharePoint.PowerShell.SPCmdletImportWeb

     

    PS D:\> Import-SPWeb -Identity "http://myteam.company.com/ismgmt" -Path d:\ism\ism2

     Import-SPWeb : The file d:\ism\ism2 does not exist.

    At line:1 char:13

    + Import-SPWeb <<<<  -Identity "http://myteam.company.com/ismgmt" -Path d:\ism\ism2

        + CategoryInfo          : InvalidData: (Microsoft.Share...CmdletImportWeb:

       SPCmdletImportWeb) [Import-SPWeb], SPException

        + FullyQualifiedErrorId : Microsoft.SharePoint.PowerShell.SPCmdletImportWeB

    I've tried this exporting to files with new names, some names with .cmp extension, (because I saw a few examples with that online), tried not specifying an extension name on the export, and so on.  The files definitely exist and I've verified that there aren't any trailing spaces on the end of the names. 

    I think the whole "file does not exist" is a complete red herring and the problem is completely different, but I can't figure out what.

    I’m using my id that has both domain admin as well as farm admin, and we’ve even gone into the ISM folder and shared it with everyone with no luck.  We’ve verified that the file exists and is spelled right.  We’ve tried with –nofilecompression as well as with out it.  We’ve tried with different file extensions as well as with none.   We've tried doing "Run as administrator" on Powershell. We’ve tried other things I’m sure but I’m starting to forget them.

    Can you see what we are missing?  This should be such a simple thing and I can’t figure out what is going wrong with it.

    Thanks in advance for the help.

    Ted

    Thursday, October 4, 2012 6:31 PM

Answers

  • Since you chose NoFileCompression when Exporting, you need to add this parameter when importing.

    Dean


    Dean MCTS-SQL 2005 Business Intelligence, SharePoint 2010, Configuration

    Monday, August 5, 2013 8:33 PM

All replies

  • One other point is that the original site was on MOSS 2007, and then upgraded to 2010.  I'm almost 100% sure that the original site collection and site were both created as Team sites, (but I can't remember how to check), and the new SC is a Team site. 

    Is there any chance that this could be caused by an incompatible template?  I assume I would get an different error than "file not found", but stranger things have happened.

    Ted

    Thursday, October 4, 2012 6:34 PM
  • What I ended up doing was just using Central Admin to export the site, list or whatever. I used powershell Import-SPWeb. For some reason the powershell command is not functioning Export-SPWeb. Doing it this way worked for me.


    Chris


    I don't have time right now to figure it out.

    Friday, October 12, 2012 12:16 PM
  • Since you chose NoFileCompression when Exporting, you need to add this parameter when importing.

    Dean


    Dean MCTS-SQL 2005 Business Intelligence, SharePoint 2010, Configuration

    Monday, August 5, 2013 8:33 PM
  • Thanks Dean, this resolved the problem when I had the exact same error.
    Friday, January 24, 2014 1:13 AM