Current and Future Clients/Partners are Welcome.
Folder Redirection - Primary Client Setting Explained
Recently, I was asked how the “Only Migrate Existing Files on Primary Client” works. More specifically I was asked how to update the primary client. For example, if an end user that has been sync'ing data from the primary client gets a new laptop, how does the synchronization continue? Let's dig in!
First off, here is what the help file says about Primary Client.
Only Migrate Existing Files on Primary Client:
Enabling this option causes ProfileUnity to only migrate existing files on the user's Primary Client. The user's Primary Client is the first computer a user logs on to after a folder redirection rule is configured.
Where is the Primary Client tracked?
The primary client is tracked in an ini file called FD.ini. This file has been marked as system file (attrib +S FD.ini). In order to see it in File Explorer, the view will need to be set to show “protected operating system files”. FD.ini is located in the root of the redirected or synchronized folder on the network share where the files are redirected.
What Happens if Primary Client Option is Not Checked?
When the “Only Migrate Existing Files on Primary Client” is not checked, any time the user logs into a machine running a ProfileUnity configuration to sync folders, the folder contents will by synchronized (one-way) to the share on the server. Each end point will only see the local files, not the total of both client files sync'd.
Here is a screenshot of my configuration, where I'm synchronizing, not redirecting, my desktop. Customer can do this to protect the "My Documents" and "My Desktop" shell folders on notebooks that either have a VPN or vist the office with a local area network. In this configuration, I'm only synchronizing new files to keep the changes to a minimum.
On the first Windows 7 laptop (GP-Win7a) the user logs in and executes the ProfileUnity configuration set to sync the "My Desktop" shell folder. The contents of the desktop is synchronized in the background to the network share configured in the "Redirect to Folder" required setting. Here is a screenshot of my network share after the first logon. Notice I created a folder and several text documents with the host name as the file name.
As you can see, the FD.ini file is placed in the root of the desktop folder on the network. The contents of the FD.ini file contains the PrimaryClient, the shell folder being redirected, and the last synch time.
Next, I logged into a second machine (GP-Win7b), again with dummy data on the desktop, named with a the different host name. Upon logon, the ProfileUnity configuration was executed and the local desktop shell folder sync'd to the network share, resulting in the network share containing fires from both systems, as seen below.
The FD.ini file was updated to include the second host that sync'd files. Now the FD.ini file has both GP-Win7a and GP-Win7b last sync times. However, only GP-Win7a is the Primary Client.
What is the behavior when the Primary Client Option is Checked?
When the “Only Migrate Existing Files on Primary Client” is checked the first client logged into still becomes the Primary Client, but ProfileUnity will not synchronize any data from any other host. This is a convenient option when a end user has multiple machines they log into and you only want to capture the data from one. Here is the ProfileUnity Folder Redirection config for the My Document shell folder. The only difference than above is the check mark in the "Only Migrate Existing Files on Primary Client".
When I logged into the first laptop (GP-Win7a), the desktop folder was created on the network share the the data synchronized in the background as seen in the below screenshot.
The FD.ini file is once again created on the synchronization target, and again it includes the host name as the Primary Client as well as the last synchronization time.
I logged in to another laptop (GP-Win7b) and the network share contents didn't change because the host name didn't match the PrimaryClient name in the FD.ini file. There isn't much to show on the network as no change as made and there wasn't a change to the FD.ini log. However the local log on the client (my logs are set to debug) shows that the host name doesn't match the Primary_Client in the log.
The above log entry was found in %temp%\ProfileUnity for the user and was located in the Client_FolderRedirection_Logon log.
What happens when a user gets a new desktop?
In this scenario, the user has been logging into GP-Win7a and the hard drive failed. IT has replaced the machine with a new machine with a new name, GP-Win7b. IT has also utilized ProfileUnity to copy the files back to the user’s desktop. Now the user needs to have a one-way sync to the share, but the name of the primary client has changed.
- Delete the FD.ini file from the share. Do not modify the file. Modifying the file as an administrator didn’t work in the tests. Simply delete the file.
- Log in on the new desktop with the same user account on the system that is to be the primary client.
- The folder redirection module creates an updated FD.ini file and sync’s the data. The share will have the contents of the new desktop and the old, in the event there was data that did not get copied back to the new system.
Below is the resulting files on the network share, a mixture of both any new files on the desktop as well as all the old files from the old desktop.
The FD.ini now lists GP-Win7b as the Primary Client rather than GP-WIn7a.
Environment Note: This was tested in a controlled lab environment to replicate a customer situation using ProfileUnity 6.8.2 with the latest hotfix.