OneDrive Folder Redirection - Data Loss!

Copper Contributor

Hi Everyone!

 

I was hoping that you would be able to help us out with an issue with Folder Redirection.

 

What we are trying to do:

  • We would like to redirect common user folders to OneDrive for Business

 

What we have done:

 

Use Case:

  • User has been using two computers with different data (but same file names) 
  • User is a new user of OneDrive

 

Issue:

  • When folder redirection runs on files with the same name, users current new files are replaced with files from OneDrive.
  • Current files are gone.  Not in any recycle bin, nor version history (OneDrive history and windows file history)

 

How to replicate issue:

  1. Add a user to the GPO (as defined in link above).  Log user into Computer 1.
    1. -> Add pictures 001.jpg… 010.jpg to picture folder
    2. -> log into OneDrive (first time setup)
    3. -> reboot computer for folder redirection GPO to take effect
    4. -> Folders are redirected to OneDrive!
    5. -> OneDrive Sync’s!
    6. -> Everything works as expected
  2. Now, on Computer 2 (does not have OneDrive configured)
    1. -> Folder redirection doesn't run as "Known Folder" doesn't exist
    2. -> Add NEW different pictures 001.jpg… 010.jpg to picture folder
    3. -> log into OneDrive (first time setup)
    4. -> reboot computer for folder redirection GPO to take effect
    5. -> Folders are redirected to OneDrive!
    6. -> OneDrive Sync’s!
    7. -> New pictures are GONE (replaced by pictures in Step 1)

 

Have you seen this before?

Could you recommend some troubleshooting steps?

 

Thanks in advance!

4 Replies
The real question is how did you set this option in the GPO setup, cause it even warns you :).

"On the Settings tab, clear the Move the contents of Documents to the new location check box.

Note: Leaving this setting enabled could result in data loss when the contents of the Documents folder is merged with the OneDrive folder, if there are files with the same name in both locations."

If you didn't enable this, then your files will still be on the computer in the old folder location c:\users\username\desktop (or documents etc).

If you did, then your probably looking at backups which I hope you have a client backup solution :(. Assuming you said you checked previous versions tab as well (check previous version of the root profile folder and then check desktop/documents folder).
Thanks for the reply Chris.

Yes, the settings are correct. The case I'm describing was caught in testing.

Do you know if this is 'expected behaviour' of folder redirection? Is there a workaround to prevent data loss?

Thanks.
Yes, uncheck that option on the GPO, and have users manually move their data over, if they have similar filenames, move to a different folder inside OneDrive. otherwise your not guaranteed issues.

I wish I had a better answer but when your talking duplicate filenames your sort of in trouble cause not everything is going to be different.

Only thing I could think of as well using some form of maybe using robocopy to find a command line that can do file compares, and if the file matches don't copy, but if it's different copy and rename if filename exists. But nothing built in will automatically do that for you, your going to have to come up with a flow manually, or with some form of script to hand out for folks to run to move that data in this given scenario.

I believe your problem is that you are not allowing Computer 2 to fully sync before rebooting and implementing folder redirection.

 

You're always going to have a problem with duplicate filenames like this. But, if you allow OneDrive to fully sync first, then implement folder redirection, the new files on Computer 2 should overwrite the files within the OneDrive folder and sync those changes to the cloud, which will then sync and overwrite the files on Computer 1 with Computer 2's versions.

 

Yes, we are still clobbering files, but at this point you should be able to go in to OneDrive's version history and now pull out the other versions of the files. If you do this in the opposite order, i.e. you redirect folders and then allow OneDrive to sync, OneDrive is going to overwrite the local copy of the file and then you don't have any version history to work with.

 

Both OneDrive and folder redirection will overwrite existing files in the destination folder. However, I can confirm it works exactly as I have described above.

 

We are implementing this in two phases. The first phase is complete - this involved pushing OneDrive to all machines and getting all users signed in and synced. Phase 2 will involve enabling folder redirection