none
How to recover deleted SharePoint Web App and IIS pools in SP2013 RRS feed

  • Question

  • While testing I dropped the main SharePoint Web application and removed the IIS app pool.  I did not remove the Content database.  

    I looked under C:\inetpub\wwwroot\wss\VirtualDirectories and the SharePoint directory is gone. This is a one-node farm so I can't copy the directories from another host.  What are my best actions to recover the environment?

    There was a full SP backup taken this morning at 1am.  Do I need to just perform a full recovery of the environment and accept the losses for the day or is there another option?

    Thanks,

    Sean

    Monday, August 26, 2019 6:58 PM

Answers

  • Web Applications are stored in the Configuration database, not the content database. Essentially, the content databases store sites, lists, libraries, and references to users who have interacted with those objects (among other things). What they do not store is farm level configuration data, such as Web Applications.

    Creating a Web App will create an IIS site as well as an Application Pool, if you did not select an existing pool. You can then add a content database to it (existing, new, or additional) which contains the content, per the above.

    Your content database is what you want to preserve, most of all. Make a backup.

    You can restore the Web Application configuration if you have a valid Farm configuration backup. But in my opinion, that's more hassle then it is worth versus creating a new Web App from scratch.


    Trevor Seward

    Office Apps and Services MVP



    Author, Deploying SharePoint 2019

    Author, Deploying SharePoint 2016

    This post is my own opinion and does not necessarily reflect the opinion or view of Microsoft, its employees, or other MVPs.

    • Proposed as answer by Michael Han6 Tuesday, August 27, 2019 1:40 AM
    • Marked as answer by Sean B6 Tuesday, August 27, 2019 3:46 PM
    Monday, August 26, 2019 10:07 PM
    Moderator

All replies

  • Create a new Web Application, add your CDB to it. Configure IIS bindings as appropriate, as needed.

    Trevor Seward

    Office Apps and Services MVP



    Author, Deploying SharePoint 2019

    Author, Deploying SharePoint 2016

    This post is my own opinion and does not necessarily reflect the opinion or view of Microsoft, its employees, or other MVPs.

    Monday, August 26, 2019 7:19 PM
    Moderator
  • Thanks Trevor.

    Will that restore the virtual directories also?  There were some SP templates being used.

    Monday, August 26, 2019 7:55 PM
  • You're creating from vdirs from scratch, but the content databases hold all of the user generated content. You shouldn't ever be modifying anything in c:\inetpub\wwwroot\wss\... by hand with SharePoint.

    Trevor Seward

    Office Apps and Services MVP



    Author, Deploying SharePoint 2019

    Author, Deploying SharePoint 2016

    This post is my own opinion and does not necessarily reflect the opinion or view of Microsoft, its employees, or other MVPs.

    Monday, August 26, 2019 8:23 PM
    Moderator
  • Thanks Trevor.

    So by creating the web application the vdirs will be recreated from the CBD? I noticed that by dropping the main SP site that it dropped several other pools and sites with it. I'll try the Web App creation to see if that works.

    Are there any concerns using a SP backup to restore the sites?  This is a SP 2013 environment so that restore is not nearly as granular as 2016 and above. 

    Thanks,

    Sean

    Monday, August 26, 2019 8:42 PM
  • Web Applications are stored in the Configuration database, not the content database. Essentially, the content databases store sites, lists, libraries, and references to users who have interacted with those objects (among other things). What they do not store is farm level configuration data, such as Web Applications.

    Creating a Web App will create an IIS site as well as an Application Pool, if you did not select an existing pool. You can then add a content database to it (existing, new, or additional) which contains the content, per the above.

    Your content database is what you want to preserve, most of all. Make a backup.

    You can restore the Web Application configuration if you have a valid Farm configuration backup. But in my opinion, that's more hassle then it is worth versus creating a new Web App from scratch.


    Trevor Seward

    Office Apps and Services MVP



    Author, Deploying SharePoint 2019

    Author, Deploying SharePoint 2016

    This post is my own opinion and does not necessarily reflect the opinion or view of Microsoft, its employees, or other MVPs.

    • Proposed as answer by Michael Han6 Tuesday, August 27, 2019 1:40 AM
    • Marked as answer by Sean B6 Tuesday, August 27, 2019 3:46 PM
    Monday, August 26, 2019 10:07 PM
    Moderator
  • Hi Sean,

    If Trevor's reply is helpful to you, you could mark it as an answer.  It will help others who meet the similar question in this forum.

    Thanks for your understanding!

    Best Regards,

    Michael Han


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

    SharePoint Server 2019 has been released, you can click here to download it.
    Click here to learn new features. Visit the dedicated forum to share, explore and talk to experts about SharePoint Server 2019.

    • Marked as answer by Sean B6 Tuesday, August 27, 2019 3:46 PM
    • Unmarked as answer by Sean B6 Tuesday, August 27, 2019 3:46 PM
    Tuesday, August 27, 2019 1:43 AM
  • Hi Trevor, recreating the WA did the trick.

    I have an issue with a reporting services not working now.  When I choose a report I get an error, "

  • For more information about this error navigate to the report server on the local server machine, or enable remote errors."  When I look at the log on the SP server I see, 'The value for UrlRoot in rsreportserver.config is not valid. The default value will be used instead. (Application: SSRS, CorrelationId: 00000000-0000-0000-0000-000000000000)"

    I recycled reporting services on the SQL host, I have not recycled the service on the SP host at this point.

    I don't want to lose any of the reports that users have created, can I recover the service, recycle or is a rebuild needed? 

    Thanks,

    Sean

Tuesday, August 27, 2019 1:35 PM