9

I have a problem while restoring a backup file on another server. Servers build versions are the same. I'm executing the Restore powershell command. And it is giving me the following error:

<nativehr>0x80070003</nativehr><nativestack></nativestack>

Attached you will find the screenshoot

enter image description here

  • what version of sharepoint is it? – Ali Jafer Feb 24 '14 at 15:18
  • have you done any updates? if so run the configuration wizard and then try again! – Ali Jafer Feb 24 '14 at 15:22
  • It is sharepoint 2013 : 15.0.4551.1508 – MIlena Feb 24 '14 at 15:27
  • Run it but still is the same – MIlena Feb 24 '14 at 15:42
  • I even created a default publishing portal. Backup-ed up it (on the same folder where I store the previous backup.It has write permissions) and than tried to restore this backup but the same error persist on restore. – MIlena Feb 24 '14 at 15:45
7
+50

There are a couple of things you can try... such as

1. Get-SPDeletedSite & Remove-SPDeletedSite

You may already have restored this site before. In that process you also deleted the site first (automatically), which you can find running the command...

>Get-SPDeletedSite

You'll see the site (or sites) listed, like this:

WebApplicationId   : 009c1289-392b-43a6-8222-146117074738
DatabaseId         : 88efc46f-5a2b-4171-81cb-7577da65bac3
SiteSubscriptionId : 00000000-0000-0000-0000-000000000000
SiteId             : 86d69f7e-3a9e-4f65-8eba-550d77f93a18
Path               : /sites/collaboration
Scheme             : Http
Url                : http://portal/sites/collaboration
DeletionTime       : 2014-02-21 11:14:18

WebApplicationId   : c73bb367-d329-4ef2-aef7-323ce207d2a9
DatabaseId         : aeb2d6ab-9f9b-493f-aefc-797d4b591f43
SiteSubscriptionId : 00000000-0000-0000-0000-000000000000
SiteId             : 9d0ed313-0353-4cec-817a-a491a8c5fc26
Path               : /
Scheme             : Http
Url                : http://portal/
DeletionTime       : 2014-02-19 15:27:37

Copy the SiteId and run

Remove-SPDeletedSite –Identity 9d0ed313-0353-4cec-817a-a491a8c5fc26

That way you won't have trouble deleting the site upon restore (which is the first thing that happens).

2. Export-SPWeb & Import-SPWeb

Depending on your scope, this may or may not be a way to move forward. It's not applicable to hundreds of SPWebs, since it will take you too long time to perform. But for a few SPWeb objects, this works very well. And if you're targeting a specific web to "move" to your development environment, then this is a good alternative to Backup/Restore-SPSite.

Start by exporting the SPWeb object. You'll get the subsites as well, but won't get workflows in your export.

>Export-SPWeb http://site –Path "C:\Backup\site-export.cmp"

Switch to your restore (import) site and execute

>Import-SPWeb http://site –Path "C:\Backup\site-export.cmp" –UpdateVersions Overwrite

I use this method when Restore-SPSite fails the way you describe.

3. Database attach method

>Restore-SPFarm -Directory <BackupFolder> -RestoreMethod Overwrite -Item <ContentDatabase> [-BackupId <GUID>] [-Verbose]

Where:

  • <BackupFolder> is the name and path for the backup folder where the service application was backed up.

  • <ContentDatabase> is the name of the content database.

If you do not use the BackupId parameter, the most recent backup will be used. To view all of the backups for the farm, type the following command at the Windows PowerShellcommand prompt:

>Get-SPBackupHistory -Directory <Backup folder>

Reference: Restore content databases in SharePoint 2013

  • 1
    I'll try it and let you know. Thnx – MIlena Feb 25 '14 at 9:11
3

Check if you're having sufficient permissions in SQL server to perform restore

Double check the managed-path try restoring to different paths like http://servername.com/sites/yousitecollection

Ensure all the customizations (WSPs) are deployed to destination (if any).

Check ULS logs for additional pointers

  • I'm a dbowner. And the wsp are deployed on the server. Uls doesn't show nothing – MIlena Feb 24 '14 at 14:17
  • Is DB attach an option as a work around for performing backup? – Falak Mahmood Feb 24 '14 at 16:51
  • You could delete any previous copy of that site collection (at destination) before restoring it. Hopefully that would help! It could also be the case that site collection backup is corrupted? – Falak Mahmood Feb 25 '14 at 0:51
1

looks like similar issue here that was answered, the issue is that its still stored in the database that you need to remove before restoring! you need to find the site with the id that exists and remove it using the method in the link, then do your restore method and it will work!

Site collection creation cancelled partway - now I can't delete or use it

  • I will try it and let you know – MIlena Feb 25 '14 at 9:10
0

I had encountered that error and the issue turned out to be that the account running the management shell did not have at least modify or higher on the network share where the .bak files were stored, and since it was overlaying an exisisting site this account needed to be either a site collection admin or higher on the existing web application, and a farm admin if the web application does not exist.

  • 1
    Welcome to SharePoint Stack Exchange, we appreciate your contribution of giving answers.. But you don't need to add your signature in the end, as your Profile Badge specifies the details :) someone corrected me once :) – Arsalan Adam Khatri Feb 22 '14 at 19:26
0

i would prefer to do the restore operation in STSADM tool instead of power shell. There are couple of times where we saw STSADM is a better tool in backup/restore operations.

  • It's the same with STSADM. It rase the same hrresult exception. – MIlena Feb 25 '14 at 9:10
0

Are you not one of the site collection admins for the site collection you are trying to restore? I've often found that to be a reason for a restore file refusing to be restored.

If it is possible to redo the site collection backup, first add yourself in as a site collection administrator for the site collection; either via Central Admin, or via powershell. Then, do your backup. Attempt the restore on the other server. Presuming you have rights to perform restores on the target server via Powershell, it just might cooperate with you.

Now if that fails, there is always the Final Solution: Use the farm account. Log onto the target server, either locally or via Remote Desktop, using the farm account. Attempt the restore. I'd save that one as a last resort.

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.