2012 Illinois Technology Association - CityLights Finalist

BLOGS

MPS Partners provides functional and technical expertise and insights into business process management trends and Microsoft technologies.

Contact Us
HOT JOBS
Interested in reviewing our current job openings or submitting a resume?
CLICK HERE
Home » Blog » SharePoint » Restore Strategy – Site Collections, Sites, Libraries, Lists, Documents, and Items

Restore Strategy – Site Collections, Sites, Libraries, Lists, Documents, and Items

What happens when a user comes to you and says my document is missing or I accidentally deleted my project site?  There are ways to empower the users to help themselves and easy ways to help yourself as administrator to solve user restore issues.
 
Restore Components
Recycle Bins
SharePoint contains two recycle bins, a first level or end user recycle bin and a second level or site collection recycle bin.  Recycle Bins can be turned off in Central Administration, if this occurs then all recycle bins will be immediately emptied.  Recycle bins are turned on by default.
Recycle Bin Settings
Recycle bin settings are managed through Central Administration at the Web Application Level. 
     1.      Navigate to Central Administration, select Manage Web Applications
     2.      Select the web application that you would like to change the settings for, click General Settings.
     3.      Towards the bottom of the window pane, there is a heading called Recycle Bins. Set the number of days that an item should be kept in the recycle bin.
     4.      Also, if quota templates are in place, a percent of live site quota can be set for the second stage recycle bin. Click OK.
End User Recycle Bin
Each site has its’ own End User Recycle Bin, items from these first level bins can also be viewed in the Site Collection Recycle Bin via the End User Recycle Bins view.  This bin will contain deleted Lists, Items, Documents, and Libraries. Items will remain in this recycle bin for the specified amount of days set in CA, the default is 30 days.
Site Collection Recycle Bin
Each site collection has a second level recycle bin (only accessible to site collection administrators) that shows a roll up of all first level recycle bin as well as those items that have been deleted from the first level recycle bin manually or automatically.  This bin will contain objects from the end user recycle bin as well as deleted sites (available in SP1).  Items will remain in this recycle bin for the specified amount of days set in CA, the default is 30 days.  If site quotas are utilized a recycle bin quote percentage can be set.  Recycle bin items do not count towards the standard site quote, the percentage is added in addition to it.  Once quotas are in place items will be deleted based on the days or the recycle bin quota, whichever is met first.
Central Administration Backup and Restore Options
SharePoint 2010 allows an administrator to restore Lists, Sites, and Site Collections from unattached databases.  This means that the database is unattached to the SharePoint Farm, not a detached database in SQL.  Granular backups can also be taken through Central Administration.
 
Restore Scenarios
To restore a deleted document, item, library or list.
     1.      Check the End User Recycle Bin of the site where the object was deleted.  Select the object and click Restore Selection.
     2.      Check the Site Collection Recycle Bin of the Site Collection of the site where the object was deleted.  Select the item and click Restore Selection.
     3.      Restore the object from an unattached database. See restore from unattached database section below for instruction.
      ***An import will explicitly overwrite anything that the export file contains. So, if the file only contains a list and the list is going to be restored to the same location, it will be overwritten. If only items that have been deleted from the list should be restored and items that currently exist should not be overwritten add the following parameter to the import-spweb powershell command. -updateversion ignore
To restore a deleted site.
     1.      Check the Site Collection Recycle Bin of the Site Collection of the site where the site was deleted.
     2.      Restore the site from an unattached database. See restore from unattached database section below for instruction.
     ***This will explicitly overwrite the site at the url listed in the PowerShell –url attribute. The site that is being overwritten must be using the same site template of the site that is in the export file.
To restore a deleted Site Collection
     1.      Restore via PowerShell. 
      ***This method is only valid if attempting to restore the site collection within the specified number of days in the recycle bin settings.  The unattached database method must be used if restoring after the allotted number of days.
         ·        Open a new PowerShell, run as administrator
         ·        Run the PowerShell command below. Replace {PATH} variable with the path where the file should be stored (ex – e:\admin)
         ·        Get-spdeletedsite | out-file {PATH}\getspdeletedsite.txt
         ·        Open the text file created in the above step. Fine the Path that matches the Site collection that has been deleted. The SiteId GUID will be used in the next step.
         ·        Run the PowerShell command below. Replace the {SiteId} variable with the GUID for the Site ID you will be restoring
         ·        Restore-spdeletedsite –identity {SiteId}
         ·        Navigate to the site to make sure it has been restored properly.
***The larger the site the longer it will take to restore. Be Patient!
      2.      Restore the site collection from an unattached database. See restore from unattached database section below for instruction.
***This will explicitly overwrite the site at the url listed in the PowerShell –url attribute. The site that is being overwritten must be using the same site template of the site that is in the export file.
To restore a corrupt item, document, list, library, site, or site collection
      1.      If this is a document or item. First try and revert to a previous version if one is available.  This is NOT an option for lists, libraries, sites, or site collections.
      2.      Restore the object from an unattached database. See restore from unattached database section below for instruction.
***An import will explicitly overwrite anything that the export file contains. So, if the file only contains a list and the list is going to be restored to the same location, it will be overwritten. If only items that have been deleted from the list should be restored and items that currently exist should not be overwritten add the following parameter to the import-spweb powershell command. -updateversion ignore
 
Restore form an unattached database
    1.      Go to CA and View All Site Collections
     2.      Navigate to the Web Application of the Site Collection from which the object was deleted
     3.      Select the name of the Site Collection. Note the Database Name.
     4.      Restore that database .bak file to a new database with a new name on the SharePoint SQL server
     5.      Go to CA, select Backup and Restore, select Recover data from an unattached content database
     6.      Enter the name of the database that the .bak file was restored to.
     7.      Choose Browser Content. Click Next.
     8.      Select the Site Collection, Site (if necessary), and then List (if necessary) that needs to be restored.
     9.      Chose Export site or list.  Click Next.
     10.   Enter a filepath (on the WFE) and file name ending in .cmp, where the export can be stored.
     11.   Select appropriate security and version options. Click Start Export.
     12.   Open a new powershell, run as administrator
     13.   Run the following commands, replace the necessary variables.
               Import-spweb –identity {URL TO RESTORE TO} -path {EXPORT FILE PATH AND NAME}
      ***Exports do not include user alerts or workflows.
This entry was posted in SharePoint. Bookmark the permalink.

Leave a Reply

Please complete the form below to submit your comment. Your email address will not be published.

Required fields are marked *

 
View By Author
  • View By Category
View By Date
Part Of SPR COMPANIES
© 2013 SPR Companies. All rights reserved. About | Competencies | Products | Solutions | Clients | Events & Resources | Careers | Site Map | Legal/Privacy