Monday, October 29, 2012

Backup and Restore a List or Document Library

How to Backup and Restore a List or Document Library? Well its an easy job. not to have worry.

There are two methods available for Exporting List or library from the sitecollection.
1) GUI based.
2) Power shell command based.

For Importing List there is only one method available and that is Power Shell.

Export List

1) GUI Based:

You can use the central admin to do granular backup jobs but PowerShell gives you a level of control and flexibility that you can’t find in the GUI.
It is an easiest method for taking backup/Export of List. Go to Cerntral Admin >> Backup and Restore 

Backup and Restore in Sharepoint 2010
 select Export a site or list. Now select options appropriately.

site collection export
After successfull filling all the details you will be redirected to Job Status page. set back and relax till Sharepoint exports lists to the specified folder. after completion small summary will be look like this :

Granular Backup Job Status in Sharepoint 2010

2) Power Shell Command Based:

The list in this case of interest is the ‘car’ list.

Export-SPWeb "" -itemurl "/Lists/car" -path "E:\car.cmp"

Please note the trailing slash on the URL. 
you can find more option on Microsoft technet article on Export-SPWeb

Import List

For Importing List, there is only one method avaialble and that is Power Shell.

Now if we deleted the list by mistake the import command is as follows.

Import-SPWeb "" -Path "E:\car.cmp"
There are various flags that can be added like ‘-force’ or ‘-UpdateVersions’. If you need more information take a look at the associated TechNet Articles on Import-SPWeb

**Note this assumes you have administrative level access to PowerShell on the farm.
 Hope this Helps.

Viral Shah 

Total Pageviews