0

I have backup of site collection from on SharePoint 2013 which is down.

I want to restore it to the new SharePoint 2013 site collection.

Below is my command:

Restore-SPSite -Identity <http://af-spt1-srv/sites/test> -Path <\\AF-SP-SRV\SharePoint\hrc.bak> [-DatabaseServer <af-dbt1-srv>] [-DatabaseName <WSS_Content_test>] [-HostHeader <Host header>] [-Force] [-GradualDelete] [-Verbose]

Wwhen I run the command it gives error see image:

enter image description here

1
  • could you please give us the exact command which you are running after others recommendations?
    – Waqas Sarwar MVP
    Commented Apr 20, 2015 at 11:51

2 Answers 2

0

The correct sintax is:

Restore-SPSite -Identity http://af-spt1-srv/sites/test -Path \\AF-SP-SRV\SharePoint\hrc.bak -DatabaseServer af-dbt1-srv -DatabaseName WSS_Content_test -HostHeader Host header -Force -GradualDelete -Verbose

You do not have to use < and > and neither [ and ]

Restore-SPSite

8
  • It give error the web application: af-spt1-srv/sites/test can not be found
    – MJ X
    Commented Apr 20, 2015 at 10:29
  • do you have the permission to create a site collection? Does a site collection with that name already exist?
    – Nk SP
    Commented Apr 20, 2015 at 10:32
  • Yes I just created it, I first created one empty content database with name wss_content_test and locked other content databases than I created site collection with name test which url is: af-spt1-srv/sites/test and it is correct but I don't know
    – MJ X
    Commented Apr 20, 2015 at 10:34
  • try to wrap the url with "" ( "af-spt1-srv/sites/test")
    – Nk SP
    Commented Apr 20, 2015 at 10:35
  • Full Error message: Restore-SPSite: The web application at af-spt1-srv/sites/test counld not be found. verify that you have typed the URL correctly. If the URL should be serving existing content, the system administrator may need to add a new request URL mapping to the intended application
    – MJ X
    Commented Apr 20, 2015 at 10:37
0

Simply, you have just copied all the arguments for the cmdlt Restore-SpSite. You only need to use some of the arguments to be able to restore a backup.

This should work for you.

Restore-SPSite -Identity "http://af-spt1-srv/sites/test" -Path "\\AF-SP-SRV\SharePoint\hrc.bak" -DatabaseServer af-dbt1-srv -DatabaseName WSS_Content_test

Just make sure that the account that are gonna restore the backup has permission to the location where the backup is.

And it's always good to run powershell/management shell as an administrator.

0

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge you have read our privacy policy.

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