Keep your Sharepoint in sync. Download and try today.
How to sync OneDrive for Business with local file shares, home drives, or other corporate data?
Microsoft OneDrive for Business can be connected and synchronized without code and bi-directionally with any local file shares, home drives, etc., using the Layer2 Cloud Connector with very flexible sync options. No issues with syncing more than 5.000 items per library. Database content can be synced as well. See below for a step-by-step intro.
OneDrive for Business is a new Microsoft cloud offering with 1TB space for any user for the best price available in the cloud market today.
Fig.: OneDrive for Business as offered by Microsoft starting July 2014.
But it's not only about storage. Users also have available almost all the features of a SharePoint MySite - without the costs and the administrative complexity of SharePoint Online.
Fig. Microsoft OneDrive for Business features compared to OneDrive for private usage.
Microsoft OneDrive for Business by default comes with a limited sync feature to keep personal files offline, such as on the user's tablet or mobile device. But how to sync corporate data like file shares, home drives, database content, etc., with OneDrive for Business to share in the cloud and access from anywhere on any device?
Prepare Your File System Source to Integrate with OneDrive for Business
For the best initial synchronization experience with the Layer2 Cloud Connector, we recommend you make sure your file system is clean and free of any of the issues/restrictions known for OneDrive for Business. Restricted file names, characters, and other issues are listed here, and this Office Support article also contains a link to Microsoft's free "Easy Fix" tool, meant for fixing your files before you upload them to OneDrive/SharePoint Online.
Note that the 5000 Item view limit and the 20000 total limit listed in the Office Support article does not apply to Cloud Connector, only the OneDrive synchronization tool.
Set Up Your File System to OneDrive Connection
This walk-through will be setting up a uni-directional sync from the specified file share location to OneDrive for Business. It can be changed to bi-directional later, if you want to sync contents in both locations to each other. It is also a good idea to wait before enabling scheduling; this can be done after you confirm the connection is working normally with manual synchronizations.
Start with opening the Layer2 Cloud Connector Connection Manager and click "Create New Connection". You can also duplicate an existing example connection as a starting place.
Fig. Example Layer2 Cloud Connector connection settings in the Connection Manager.
Please note that if there is content already in the OneDrive for Business Documents library, that you will need to enable Overwrite Destination (for initial syncs) in the connection settings.
Next step is to configure the Source data entity, which will be the file system location you want to pull files from.
Fig. Example file system location on the C:\ drive.
In the left-hand column, expand the Data Entities node to see the Source and Target nodes. Select the Source node, which is the top one. Fill out the settings for a file system connection.
- Data Entity Title: Give your entity a meaningful name
- Entity Type: Should default to "Source"
- Data Provider: In the drop-down, select "Layer2 Data Provider for File System"
- Connection String:
Directory=<pathToYourContent>;
In this example, it will be Directory=C:\Test_Documents; - The rest will be left blank/unset for now
Note that you can use other notations for the directory, such as
'\\myserver\myshare' or '\\127.0.0.1\C$\Test2'. By default, Integrated
Authentication is used to access the file location. You can also give an account
to use with the notation:
User=MyDomain\myUser; Password=myPassword;
Verify the connection works by clicking the Verify Connection String blue link, as well as clicking Preview Data in the right-hand menu to see the first 10 objects in the location given.
Fig. Example configuration for the file system source.
Next comes the Target configuration to your OneDrive for Business' default Document library. First you need to gather the proper URL to use for the connection string. In a browser, navigate to your OneDrive for Business location. It should be in the new UI style. Click on "Return to classic OneDrive" in the lower left-hand corner.
Fig. Finding the link to go back to the 'Classic UI' in OneDrive.
When the older UI reloads, the URL now in the browser address bar is the correct one to use with the Cloud Connector. It should look something like this:
https://company-my.sharepoint.com/personal/myAccount/Documents/Forms/All.aspx
Copy that URL to use for the next part. (If you are using a non-default location and need help getting the URL to use, see the "Getting the Correct URL for OneDrive Locations" section of the OneDrive solution page.)
Select the Target node, which is the second one. Fill out the settings for a OneDrive connection, which is actually just a type of SharePoint Online connection.
- Data Entity Title: Give your entity a meaningful name
- Entity Type: Should default to "Destination"
- Data Provider: In the drop-down, select "Layer2 Data Provider for SharePoint (CSOM)"
- Connection String: url=http://mydomain.com/mySite/myLibrary/Forms/All.aspx; Authentication=Office365; User=myAccount@company.com; Password=myPassword;
- The URL=; parameter will be the URL you copied above from the browser.
- The rest will be left blank/unset for now
Verify the connection works by clicking the Verify Connection String blue link, as well as clicking Preview Data in the right-hand menu to see the first 10 objects in the location given.
Fig. Example configuration for the OneDrive for Business default Document library.
Lastly, comes setting the column mapping. Select the Mappings node from the left-hand column. It should default to have Auto Mapping enabled, which is fine for most file syncs.
Fig. Example mapping with Auto Mapping enabled.
Configuration is now complete and you can run the initial file synchronization. Click on the main connection node (with the green plug) in the left-hand column to select the connection settings. At the bottom is a Run Now button. Press that to start the sync!
If the sync finishes with errors, check the Logs node for more details. You can increase the log level in the Connection Manager root and run again to receive more detailed information. In most cases, issues are related to known SharePoint limitations regarding file names, sizes and types allowed, path lengths allowed, etc. If you took the recommended steps above to clean your file system first, most issues will be avoided.
Fig. Example output from a successful initial sync to OneDrive for Business.
Manage Your Files in the OneDrive Document Library
Now take a look at your OneDrive location. You should see all the files there from the file system.
Fig. Example of OneDrive library now populated with files from the synchronization.
If you are satisfied with the results, you can enable scheduling in the Connection Manager. It can be set to run every hour, every 10 minutes, or even shorter, depending on your needs.
Please note:
- All options of OneDrive for Business are fully available, such as file search, versioning, change notifications via RSS or email, workflows etc. You can access your files from any device and location.
- Files can be updated in background automatically by the Cloud Connector, with it only processing changes to the content. Please check your Connection Manager root for this. You can enable and disable the Layer2 Cloud Connector Windows Service there.
- Bi-directional connections are supported as well.
- Cloud Connector has no issues with the 5.000 items list view threshold. Some view options will become unavailable in this case. But you can still use your library with unsorted, ungrouped and unfiltered views or make use of indexed columns or managed metadata navigation. Search can be used without restriction to find files. However, take care to prepare your views before reaching the threshold as you may not be able to adjust them once you reach the limit. Alternatively, you can sync to several different libraries to keep things below the threshold.
- You can add additional unmapped columns for use only in OneDrive, e.g. managed metadata or feedback columns. Unmapped columns are kept as-is during updates.
- You can update specific columns with other connections, such as with database content.
- Folders are fully supported. You can even sync to specific folders of an already existing library.
- You can filter the data source file share for specific criteria, e.g. file types.
- You can add additional sync options like "no insert", "no update", "no delete" for specific requirements. Check the Advanced Settings section at the bottom of the data entities to access these.
- You can sync using the scheduling service, as well as on-demand (with command line).
- In this walk-through Auto Mapping is used, but you can also map specific columns with certain file metadata manually, if required.
Next steps: Download a FREE shareware edition of the Layer2 Cloud Connector
You want to do more? Just ask sales@layer2solutions.com for any specifc scenarios or licensing options. You can start with the free Shareware Edition after registration.
Explore frequently asked questions by topics.
Ready to go next steps?