I'm trying to restore from a backup via PowerShell with the following commands:

add-pssnapin Microsoft.SharePoint.PowerShell
restore-spsite -Force -Confirm:$false -Identity https://uslv-acsw-t4.dev.local:5000/ -Path C:\2012-07-31-Backup\Home.bak

It's failing with the following (frankly useless) error:

Restore-SPSite : Cannot complete this action.
Please try again.
At line:1 char:15
+ restore-spsite <<<<  -Force -Confirm:$false -Identity https://uslv-acsw-t4.dev.local:5000/ -Path C:\2012-07-31-Backup\Home.bak
    + CategoryInfo          : InvalidData: Microsoft.Share...dletRestoreSite:SPCmdletRestoreSite) [Restore-SPSite], SPException
    + FullyQualifiedErrorId : Microsoft.SharePoint.PowerShell.SPCmdletRestoreSite

What is causing this error and how can I fix it?

  • It's probably worth noting that other .bak files taken during the same backup restore perfectly fine, it's just the root site collection that refuses to restore from any backup no matter how old or new... – David Perry Aug 1 '12 at 0:27
  • Have you tried to delete the existing site collection and the run the restore without -force? – Per Jakobsen Aug 1 '12 at 7:56
  • have you tried my answer??? – Strider Aug 7 '12 at 14:05
  • @Paddy yes, no change. At this point we've restored the farm from VMWare snapshots rather than waste more time trying to make SharePoint's built-in restore functionality work. It's sad to know that we can't rely on it but at least we have alternatives. – David Perry Aug 7 '12 at 15:34
  • I had the same error. This was in my Dev environment and I figured out the existing database got corrupted (long story). I created a new content database and restored the site collection there with no issue. – Peter Mendez Apr 26 '17 at 17:44

It may be a case where you've got an old instance of that target site collection that still has pieces of it left over in the content database that SharePoint is trying to restore the backup into. One thing you may try is creating a new content database and restoring the site collection into that content database.



In addition to John's answer please verify if by any chance you have SQL Server Express installed, sharepoint restore is likely to fail because of certain limitations.

  • This is in our corporate test environment (thank God I haven't pointed these scripts at production) which exactly mirrors production so it's all Enterprise editions, no Express allowed :) – David Perry Aug 1 '12 at 6:22
  • Why is that? Express is the default installation for a Sharepoint – Saariko Nov 21 '13 at 14:09

u can restore from command prompt also. first go to bin folder -> cd C:\Program Files\Common Files\Microsoft Shared\Web Server Extensions\14\BIN

then restore ur backup ->

Stsadm.exe -o restore -url yoursiteurl -filename c:\\backupfilename.bak -overwrite

Try to check ULS logs by ULS Viewer for SPException. By default logs are stored here:

SharePoint 2010: %commonprogramfiles%/Microsoft Shared/web server extensions/12/Logs
SharePoint 2013: %commonprogramfiles%/Microsoft Shared/web server extensions/14/Logs
SharePoint 2016: %commonprogramfiles%/Microsoft Shared/web server extensions/16/Logs

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Not the answer you're looking for? Browse other questions tagged or ask your own question.