Restore SharePoint Site Collection
Overview
Restoring a site collection becomes necessary in the following situations:
- If a site-collection has been deleted in the SharePoint environment [intentionally/accidentally] and at a later point you need it.
- If a site-collection has been modified and you need the original.
- If you need a redundant copy of an important site-collection.
- If you lost a portal site and subsequently created a new one but now would like to restore the original site collections.
You can restore SharePoint site-collections using your most recent backup version or the preferred version of a backup file. This section gives information on how to restore SharePoint site collections using StoreGrid.
Restore SharePoint Site Collections
Restoring SharePoint Site-Collections in Windows requires a couple of extra steps. Follow the instructions detailed below.
- Follow the steps for a regular restore operation and restore the required site-collection backup files.
- Once restored, the required files are now in their designated locations:
<Restore Path>\<Temp_Dump_Location>\<Backup_Name>\<Portal_Site_Name>\<Site_Collection_Name>\<Site_Collection_Name.dat>
The restored SharePoint site-collection files end with an extension ".dat".
Note: Portal Site name and site-collection name will be modified as per the following rules and used as file/folder name.
- The character colon (:) in the portal site URL will be replaced with "@".
- The Characters \<>/*?"| and space characters in the portal-site/site-collection will be replaced with underscore(_). Other characters will remain the same.
- "http://" or "https://" will be removed.
For example:
- Assume that the portal URL is "http://winserver3:9090".
- Let one of the site-collections under it be "http://winserver3:9090/sites/first-No.1site".
- Let the temporary dump path be "C:/TEMPORARYDUMP".
- Backup name be "MySharePointBackup".
The above backup will be restored in the location: <Restore Path>\C-Drive\TEMPORARYDUMP\MySharePointBackup\winserver3@9090\winserver3@9090_sites_first-No.1site\winserver3@9090_sites_first-No.1site.dat
- In order to use the restored site-collection backup file, follow the steps given below:
- Open the command prompt and go to the location where the backup tool STSADM.exe is existing. Normally for WSS3.0/MOSS2007, it is located at "C:\Program Files\Common Files\Microsoft Shared\web server extensions\12\BIN\" and for WSS2.0/MOSS2003, it is located at "C:\Program Files\Common Files\Microsoft Shared\web server extensions\60\BIN\".
- The restored *.dat file can be restored to a site-collection in any of the following restore strategies.
NOTE: Please read the caution section before proceeding to restore a site-collection.
Restore Strategy #1 : Restore the site-collection to the SAME site-collection which is still present or deleted:
In the command prompt, enter the following command. stsadm.exe -o restore -url <Site_Collection_URL> -filename <Backup_File_Name> -overwrite

Note: If the site exists, the above command will completely overwrite the existing site-collection with the restored site. The existing new sub-sites, documents, events, contacts etc. that were not present in the backed up site will be deleted. If the site had been deleted in the portal, then the above command would restore the site-collection to the state as when it was backed up.
Restore Strategy #2 : Restore the site-collection to a NON-EXISTING, NEW site-collection:
NOTE: This restore strategy involves 2 steps and completely you need to use the command prompt if you wish to follow this restore strategy.
To restore the backed up site-collection to a new site-collection, first create a new site-collection in new database and then restore the backed up site-collection *.dat here.
In the command prompt, enter the following command. stsadm.exe -o createsiteinnewdb -url <New_Site_Collection_URL> -databasename <New_Database_Name> -ownerlogin <Site_Collection_Owner> -owneremail <Email_Of_Site_Collection_Owner>

The above command will create a new site in the specified new database. Now, run the following command to restore the backed up site-collection to the newly created site-collection. stsadm.exe -o restore -url <New_Site_Collection_URL> -filename <Backup_File_Name> -overwrite

Note: The above command will restore the site-collection to the new site. Access this new site via browser and check if the restore operation was successful.
Caution
- Restoring default site-collections in WSS2.0/SPS2003 is not permitted. This attempt is strictly not recommended for WSS2.0/SPS2003.
- Do not restore a site-collection to an existing different site-collection in the same portal site which uses the same database.
Example: Let us assume, a portal site named portal_no.1 contains 3 site-collections, namely, site_collection_no.1, site_collection_no.2, site_collection_no.3 and you have backed up these 3 sites. Now you wish to restore the site_collection_no.1 to the portal site portal_no.1 . To accomplish this, you could restore the *.dat file in any of the following ways:
- Restore the *.dat file to the same site-collection [site_collection_no.1]
- Restore the *.dat file to a new site-collection, say site_collection_no.4 [which you like to create under portal_no.1 itself].
If you wish to follow the second method [restoring to a new site-collection] you must create the new site-collection with the createsiteinnewdb switch using STSADM.EXE. See restore strategy #2 for more information about this restore strategy.
DO NOT try to restore the *.dat file [back up of site_collection_no.1] to site_collection_no.2 or site_collection_no.3 .
Reason: Duplication of site-collections in a single database is not permissible and hence using the "stsadm.exe -o restore -url ..." command would destroy that restored site and would make it inaccessible via browser and corrupt. Therefore, for a risk free restore process, restore the site-collection to the same site or restore it to a new site-collection created in new database(using the command "stsadm.exe -o createsiteinnewdb -url ...").
- Restoring SharePoint 'Central Administration' may not bring the original Central Administration's whole UI and its functionalities.
Limitations
- Restoring default site-collections in WSS2.0/SPS2003 is not permitted. This attempt is strictly not recommended for WSS2.0/SPS2003.
- Restoring SharePoint 'Central Administration' may not bring the original Central Administration's whole UI and its functionalities.
- The *.dat file path will not be same as the site-collection's URL because the temporary dump files are assigned a name, modified from the portal site and site-collection URL. The reason behind not using the site-collection URL as it is in the file name is that Windows doesn't allow some characters like \<>:/*?"| in a file/folder name. The character ":" will be modified to "@" and the rest will be modified to "_" and used for file/folder names.
- Though the whole SharePoint Server or a whole portal site is selected for backup, only a site-collection level of backup will be done. Hence, to restore all the site-collections under a portal site, you need to restore the site-collections under that portal site one by one using STSADM.EXE.
|