Exporting documents from SharePoint using RoboCopy / RichCopy utility

I was recently asked if there was a way to batch copy files out of SharePoint and be able to log success / failure. There are many tools that import files into SharePoint but not much that does the opposite. So after some thought I looked into using RoboCopy and found a great GUI version called RichCopy which can be downloaded from here http://technet.microsoft.com/en-us/magazine/2009.04.utilityspotlight.aspx?pr=blog.

To use this utility with SharePoint you will need to map the document libraries individually to a network drive, for example:

NET USE X: http://sharepoint/documents

Once the individual document library has been mapped you are then able to specify the X drive you have mapped in RichCopy and specify a local directory to copy/move the files to.

image

Click on options and select the various options that apply for you.

image

You will notice that when you do export the documents it also exports the forms folder containing allitems.aspx etc. You can filter this folder so this does not copy across to the destination folder by enabling advanced options which also includes logging configuration.

Please note that this solution does not map SharePoint metadata. If this is a requirement then it is advised you look at the 3rd party offerings available to achieve this.

Blocking Access to SharePoint Web Services in an Extranet / External Publishing Scenario

This article discusses a method of blocking access to SharePoint web services from external connections.

To do this you will need a publishing server such as Microsoft ISA Server / Forefront TMG or 3rd party application, I would also strongly advise that if you haven’t planned for such a server then revise your design to include one (preferably 2 for clustering, HA etc..).

So assumptions at this stage are that SharePoint is installed and ready to be published. A further assumption is that you have already created a publishing rule on ISA for the SharePoint Web application you want to publish and it is correctly configured and publishing SharePoint successfully.

The next step is to create a new standard web publishing rule (not a SharePoint rule) and place this ABOVE the SharePoint publishing rule for the main site – remember in ISA the rules are based on ordering.

So basically at this point what we want to do it block access to the SharePoint /_layouts/_vti_bin folder.

Call the Publishing Rule some thing like ‘Extranet Web Service Block Rule’ use the same web listener as that you have published SharePoint with.

image

Select the Paths tab and remove any entries. Then add a new path as follows:

image

What this will do is redirect anyone trying to access the _vti_bin folder to the accessdenied.aspx page blocking anyone from connecting to the webservice asmx files.

It is more than likely that the rule will need tweaking for authentication to work correctly so be prepared to spend sometime testing this to get it right.

An excellent post I would recommended around SharePoint Extranet best practices and lockdown is Joel Oleson’s post here.

The purpose of this post is by no way as a step-by-step guide to publishing SharePoint via TMG / ISA but simply a guide to blocking web service access.

The consequences of blocking the web services will certainly impact on functionality of SharePoint externally and it usage and it is advised that such a change should be fully tested to make sure loss of functionality is not experienced by end users. Further tweaking to specific web services can be achieved using path mapping.