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.
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.
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”:
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:
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.
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 email@example.com -SyncDirection 2 -Password "MY PASSWORD"
The ShareFile Sync client examined the local data, found it to be in sync, and that was it.
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.