Citrix ShareFile Sync on a New Computer with Existing Data

Switching over to a new computer is certainly fun for a geek, but getting back to a perfectly tuned configuration can be a lot of work, whether you synchronize (part of) your data to the cloud or not.

Migrating Data

What I like to do is simply copy all my data over. What used to be an easy (although lengthy) process has become more complicated with the use of tools that synchronize some part of my directory structure with their respective cloud. When I moved to my current PC just recently I was using two such tools: TeamDrive (which I use as a virtual file server for sensitive data due to its client-side encryption) and ShareFile. The interesting question is, of course, how the sync tool handles data that already exists locally.

TeamDrive

In case of TeamDrive the process was fairly painless. Its sync client has a feature to tell it you already have the data so it need not download everything. Just make sure everything is in sync and keep it that way.

Then I installed the ShareFile Sync client for Windows. That proved to be a tougher nut to crack.

ShareFile Sync for Windows

First of all, it creates your local sync directory in %UserProfile%\ShareFile - not exactly my favorite location - and immediately starts synchronizing. Next, when you try to do the obvious thing and configure ShareFile to sync to your previous data directory it complains about the directory not being empty with the message “you can only sync to an empty folder”:

Citrix ShareFile Sync - Folder not empty

Personal Folder / My Files & Folders

So I turned to PowerShell and used the information I published earlier to configure that sync job manually: I deleted the auto-created sync job and recreated it with the desired target directory. While the PowerShell commands did not give me any error the Sync engine did not seem to be too happy with what I had done. It went on strike and refused to acknowledge the new sync job:

Citrix ShareFile Sync - no sync jobs

I had to delete the entire client state in %AppData%\ShareFile and %LocalAppData%\ShareFile to get it to cooperate again. I accepted the inevitable, deleted my local copy of the synchronized data and had ShareFile re-download everything. With that I had My Files & Folders back in a synchronized state.

Deleting the Default Local Personal Folder Sync Target

Once you have moved the synchronization target from the default to a directory of your choosing you might feel the inclination to delete the directory created automatically in the root of the user profile. That proves to be more difficult than necessary because ShareFile Sync alters the default file system permissions so that even administrators have only read access:

D:\>SetACL.exe -on C:\Users\helge\ShareFile -ot file -actn list

C:\Users\helge\ShareFile

   DACL(protected+auto_inherited):
   SYSTEM           full                                 allow   container_inherit+object_inherit
   Administrators   read_execute+WRITE_OWNER+WRITE_DAC   allow   container_inherit+object_inherit
   HKW540\helge     read_execute+WRITE_OWNER+WRITE_DAC   allow   container_inherit+object_inherit

The same does not happen with the custom sync directory, the sync client luckily leaves its permissions as they are.

Shared Folders

As described earlier I had several shared folders configured to sync to different directories on my hard drive, some of which are quite big. I tried again with those sync jobs, and voilà, that worked without a hitch. Note: for each shared folder use a command like the following:

Add-SyncJob -ApplicationId 1 -ApplicationName "PowerShell" -Account helgeklein.sharefile.com 
-RemoteFolderName "xxxxxx-xxxx-xxxx-xxxx-xxxxxxx" -LocalFolderPath "D:\Some local directory" 
-AuthType 4 -UserName xxxxxx@helgeklein.com -SyncDirection 2 -Password "MY PASSWORD"

The ShareFile Sync client examined the local data, found it to be in sync, and that was it.

Conclusion

Apparently the ShareFile Sync client currently does not support initial synchronization of the personal folder with an existing local directory. But the same works flawlessly for additional shared folders.

Comments

Related Posts

Configuring Citrix ShareFile Sync from PowerShell

Configuring Citrix ShareFile Sync from PowerShell
When you have a cloud-based file sharing service it makes a lot of sense to synchronize part or all of the data with your desktop computer. Citrix ShareFile offers the Sync for Windows tool for that purpose. However, once you open its configuration screen you notice that has a severe restriction: it can only synchronize to a single local folder. In many cases it would make much more sense to synchronize different cloud folders to different locations on your hard disk. When I complained to the product manager Peter Schulz about this I learned about a hidden gem: the single folder restriction is only present in the UI; the underlying sync engine is much more flexible. And the best thing is: the sync engine can be configured from PowerShell. Here is how.
Citrix/Terminal Services/Remote Desktop Services

Latest Posts

Fast & Silent 5 Watt PC: Minimizing Idle Power Usage

Fast & Silent 5 Watt PC: Minimizing Idle Power Usage
This micro-series explains how to turn the Lenovo ThinkCentre M90t Gen 6 into a smart workstation that consumes only 5 Watts when idle but reaches top Cinebench scores while staying almost imperceptibly silent. In the first post, I showed how to silence the machine by replacing and adding to Lenovo’s CPU cooler. In this second post, I’m listing the exact configuration that achieves the lofty goal of combining minimal idle power consumption with top Cinebench scores.
Hardware

Fast & Silent 5 Watt PC: Lenovo ThinkCentre M90t Modding

Fast & Silent 5 Watt PC: Lenovo ThinkCentre M90t Modding
This micro-series explains how to turn the Lenovo ThinkCentre M90t Gen 6 into a smart workstation that consumes only 5 Watts when idle but reaches top Cinebench scores while staying almost imperceptibly silent. In this first post, I’m showing how to silence the machine by replacing and adding to Lenovo’s CPU cooler. In a second post, I’m listing the exact configuration that achieves the lofty goal of combining minimal idle power consumption with top Cinebench scores.
Hardware