none
Unable to restore Sharepoint 2013 web application from production server to testing

    Question

  • Hi guys, Hope everyone is doing well.

    our public facing website has developed in sp 2013, I want to restore the web site from production to testing.

    Basically we have one web application in production and that application has 2 site collections, thus the reason I have taken the backup of web application from production server using powershell and copied the folder in testing environment.

    and created new web application in testing environment and then created a site collection, then tried to restore using following powershell command

    Restore-SPFarm -Directory'E:\Backup_20161225_040004' -Restoremethod Overwrite -Item 'SharePoint - 16568' -Verbose
    
    

    and I'm getting following error

    And in log files I'm getting following errors related to databse

    Cannot connect to SQL Server. 10.0.7.11 not found. Additional error information from SQL Server is included below.  Connection Timeout Expired.  The timeout period elapsed while attempting to consume the pre-login handshake acknowledgement.  This could be because the pre-login handshake failed or the server was unable to respond back in time.  The duration spent while attempting to connect to this server was - [Pre-Login] initialization=1; handshake=15921; 

    12/30/2016 18:24:30.87 OWSTIMER (0x1B84) 0x28BC SharePoint Foundation Upgrade SPUpgradeSession ajxme ERROR Exception: Connection Timeout Expired.  The timeout period elapsed while attempting to consume the pre-login handshake acknowledgement.  This could be because the pre-login handshake failed or the server was unable to respond back in time.  The duration spent while attempting to connect to this server was - [Pre-Login] initialization=1; handshake=15275;  1628c69d-d002-7017-4531-85c6d0baef70


    But I'm still able to view existing sites and can create new web applicatios and all..

    May I please know why I'm getting this error and how to resolve it.


    Asrar..

    Friday, December 30, 2016 3:39 PM

Answers

  • Hi Ma'am,

    Thanks for your response.

    Yes yesterday I did the same.

     

    For people if they get any problem in restoring the simple steps are

    > Take backup from sql server

    > copy the backed up folder in your environment where you want to restore

    > Go to ssms

    >click on database

    > Restore from file

    > once done, then right click on that particular database and click on take offline once it completes make it online

    > now go into the web application where you want to restore

    > delete the existing database from Central administration of that web application > Application management >manage content database>select the application name>click on existing database> select remove content database >Ok

    >Add content database> copy the name of database from SSMS and paste in database name

    > you have done almost, but it will not work unless you dont deploy your solutions of .net(If you have)

    > just deploy then it will start working.

    All the best guys.


    Asrar..



    • Edited by Asrar.haq Monday, January 2, 2017 8:30 AM
    • Marked as answer by Asrar.haq Monday, January 2, 2017 8:30 AM
    Monday, January 2, 2017 8:29 AM

All replies

  • Hi Asrar,

    From your description, you want to restore SharePoint 2013 web application from production to testing.

    What is the version of the production environment and what is the version of the testing environment?

    I recommend that you follow the steps below:

      1.  Backup SQL Database on production environment with SQL Server tools.

      2.  Restore the SQL Database Backup to the testing environment with SQL Server tools.

      3.  Attaching a content database by using the Mount-SPContentDatabase cmdlet to associate the content database with a Web application in the testing environment.

    Mount-SPContentDatabase -Name <DatabaseName> -WebApplication <WebApplicationID> [-Verbose]

    https://technet.microsoft.com/en-us/library/ee748633.aspx?f=255&MSPPError=-2147217396

    Refer to the following method to restore SharePoint 2013 web application:

    https://technet.microsoft.com/en-us/library/ee748647.aspx

    Best Regards,

    Lisa Chen


    Please remember to mark the replies as answers if they help.
    If you have feedback for TechNet Subscriber Support, contact tnmff@microsoft.com

    Monday, January 2, 2017 8:00 AM
    Moderator
  • Hi Ma'am,

    Thanks for your response.

    Yes yesterday I did the same.

     

    For people if they get any problem in restoring the simple steps are

    > Take backup from sql server

    > copy the backed up folder in your environment where you want to restore

    > Go to ssms

    >click on database

    > Restore from file

    > once done, then right click on that particular database and click on take offline once it completes make it online

    > now go into the web application where you want to restore

    > delete the existing database from Central administration of that web application > Application management >manage content database>select the application name>click on existing database> select remove content database >Ok

    >Add content database> copy the name of database from SSMS and paste in database name

    > you have done almost, but it will not work unless you dont deploy your solutions of .net(If you have)

    > just deploy then it will start working.

    All the best guys.


    Asrar..



    • Edited by Asrar.haq Monday, January 2, 2017 8:30 AM
    • Marked as answer by Asrar.haq Monday, January 2, 2017 8:30 AM
    Monday, January 2, 2017 8:29 AM
  • Hi Asrar.haq,

    I am glad to hear that the issue is solved.

    Please remember to also mark the reply as an answer if it helps.

    Have a nice day!

    Best Regards,

    Lisa Chen


    Please remember to mark the replies as answers if they help.
    If you have feedback for TechNet Subscriber Support, contact tnmff@microsoft.com

    Monday, January 2, 2017 8:37 AM
    Moderator