Project Description

This program will sync files from unc/local/sharepoint to a SharePoint 2007, 2010, or 2013 server. Supports up to 2GB files.

Features

  • File syncronization (up to 2GB) from local/unc/SharePoint to remote SharePoint (2007 v1.8 or earlier, 2010 v1.9 - v.20, 2013 v3) instance
  • Has option to zip source files first and deliver a single zip package to the destination
  • Manual syncronization (with force overwrite)
  • Syncronize files with metadata. Just create a new column in the sync list and it will automatically be read and set on next sync.
    • If the sync occurs from a local sp site then the metadata will sync automatically if the columns are available in the destination
  • When syncing from SharePoint is the metadata fields exist in the destination it will sync those as well
  • An event receiver will remove items from the destination is the sync item is deleted from the list

Getting Started

  • Install wsp
  • Activate Rsync Content Type feature at the site collection level
  • Activate Rsync List at web level (its hidden in the wsp download so use stsadm -o activatefeature -name RSynclist -url http://weburl)
  • 2 lists are created, a management list and an initial sync list
  • A timer will run every 5 minutes on the management list which will find your sync list and give it a timer based on your management list values
  • A a new item into the initial sync list and wait for the magic

Requirements

  • SharePoint 2007 (any release before 1.9) or 2010 (any release between 1.9 and 2.0) or 2013 (release 3.0 and up)
  • Webclient must be running on SharePoint server (used for file comparison, not file copy)
    • May need to modify webclient registry to support files over 50MB: http://blogs.msdn.com/b/robert_mcmurray/archive/2008/01/17/webdav-redirector-registry-settings.aspx
  • Safecontrol line must be added in web.config for the menus and manual sync page to work (only for SharePoint 2010 and 2007 solutions, this was fixed in 2013 solution)
    • <SafeControl Assembly="SharePointRsync, Version=1.0.0.0, Culture=neutral, PublicKeyToken=6ef6cf8f9143533e" Namespace="SharePointRsync" TypeName="*" Safe="True" />

Tech Specs

  • 1 site feature containing list content type and list menus (action menu and item menu) and event receiver
  • 1 web feature which when activated will create a list for entering sync data using the content type
    • Also creates a timer job which will run nightly
  • 1 layout page that is accessed from the manual sync menu. Creates a one time minute timer job to run the sync.
  • 3 GAC dll

Licensing

  • Project is GPL however I use a client library for the FPRPC calls (http://hubkey.com/SharePointAPI.aspx) which does not allow commercial use without purchasing a license. Please contact me for more information if you intend on making a profit form this code. Their creative commons license can be found within the project.
  • Uses dotnetzip found http://dotnetzip.codeplex.com/

Last edited Sep 17, 2013 at 4:01 AM by jkuter, version 22