How to Back Up SharePoint Document Library to File

There may be times where you question the reliability of SharePoint environment, or simply need to backup your SharePoint information to a Document Library.  There are two ways you can do this and I have outlined them below.

BACKING UP YOUR DATA USING ROBROCOPY

Robocopy is a command-line directory replication command tool. It has been available as a part of the Windows Resource Kit since back in the days of Windows NT 4.0, but few have known of it.  As of Windows 7/2008, it became a standard feature.  It is very similar to X-Copy, but you do not have to map the drive first as you often have to do with X-Copy.

To back up a SharePoint directory, you must go to a Document Library and open it in Windows Explorer by going to Actions>Open in Explorer. Remember that path that is displayed in the explorer bar.

In this application, you can either make a batch file if you need to automate the task, or simply open a command-line and type robocopy to use the tool.  To use Robocopy, you need to know the location you are copying data from, the directory that you are copying the data too, and any special switches that you want to use.  An example would be:

@echo off

robocopy \\cipt0283\sites\CI\SiteDirectory\Technology-and-Architecture\dcops\proj c:\xcopy /MIR

RoboCopy Resouce Page:   http://technet.microsoft.com/en-us/library/cc733145%28WS.10%29.aspx http://technet.microsoft.com/en-us/magazine/2006.11.utilityspotlight.aspx

BACKING UP YOUR DATA USING X-COPY

Xcopy is a command-line tool used on several operating systems including Windows.  It has been available since the days of MS Dos and is used for copying multiple files or even an entire directory tree from one directory to another and for copying files across the network.

One of the set-backs of using Xcopy is that you must have a mapped drive.  So, to use Xcopy to back up a SharePoint Directory, you would have to execute the following command: net use x: http://siteaddress/shared documents /user:Domain\LOGIN PASSWORD

You can then use the command xcopy to direct files to a local location. (xcopy x:\* /e = Copy everything on the X: drive to the directory you are currently in.)  

Xcopy Resource Page: http://www.computerhope.com/xcopyhlp.htm

About badams

Ben Adams has been working with SharePoint since 2006 starting with SharePoint Services 2.0 and moving on to SharePoint 3.0 and SharePoint 2010.
Posted on by badams

Comments are closed.