OneDrive Folder Redirection - Data Loss!

%3CLINGO-SUB%20id%3D%22lingo-sub-131730%22%20slang%3D%22en-US%22%3EOneDrive%20Folder%20Redirection%20-%20Data%20Loss!%3C%2FLINGO-SUB%3E%3CLINGO-BODY%20id%3D%22lingo-body-131730%22%20slang%3D%22en-US%22%3E%3CP%3EHi%20Everyone!%3C%2FP%3E%0A%3CP%3E%26nbsp%3B%3C%2FP%3E%0A%3CP%3EI%20was%20hoping%20that%20you%20would%20be%20able%20to%20help%20us%20out%20with%20an%20issue%20with%20Folder%20Redirection.%3C%2FP%3E%0A%3CP%3E%26nbsp%3B%3C%2FP%3E%0A%3CP%3E%3CSTRONG%3EWhat%20we%20are%20trying%20to%20do%3A%3C%2FSTRONG%3E%3C%2FP%3E%0A%3CUL%3E%0A%3CLI%3EWe%20would%20like%20to%20redirect%20common%20user%20folders%20to%20OneDrive%20for%20Business%3C%2FLI%3E%0A%3C%2FUL%3E%0A%3CP%3E%26nbsp%3B%3C%2FP%3E%0A%3CP%3E%3CSTRONG%3EWhat%20we%20have%20done%3A%3C%2FSTRONG%3E%3C%2FP%3E%0A%3CUL%3E%0A%3CLI%3EWe%20have%20created%20the%20GPO%20as%20defined%20in%20this%20article%20below%3C%2FLI%3E%0A%3CLI%3E%3CA%20href%3D%22https%3A%2F%2Fsupport.office.com%2Fen-us%2Farticle%2FRedirect-known-folders-to-OneDrive-for-Business-e1b3963c-7c6c-4694-9f2f-fb8005d9ef12%22%20target%3D%22_blank%22%20rel%3D%22noopener%20noreferrer%22%3Ehttps%3A%2F%2Fsupport.office.com%2Fen-us%2Farticle%2FRedirect-known-folders-to-OneDrive-for-Business-e1b3963c-7c6c-4694-9f2f-fb8005d9ef12%3C%2FA%3E%3C%2FLI%3E%0A%3C%2FUL%3E%0A%3CP%3E%26nbsp%3B%3C%2FP%3E%0A%3CP%3E%3CSTRONG%3EUse%20Case%3A%3C%2FSTRONG%3E%3C%2FP%3E%0A%3CUL%3E%0A%3CLI%3EUser%20has%20been%20using%20two%20computers%20with%20different%20data%20(but%20same%20file%20names)%26nbsp%3B%3C%2FLI%3E%0A%3CLI%3EUser%20is%20a%20new%20user%20of%20OneDrive%3C%2FLI%3E%0A%3C%2FUL%3E%0A%3CP%3E%26nbsp%3B%3C%2FP%3E%0A%3CP%3E%3CSTRONG%3EIssue%3A%3C%2FSTRONG%3E%3C%2FP%3E%0A%3CUL%3E%0A%3CLI%3EWhen%20folder%20redirection%20runs%20on%20files%20with%20the%20same%20name%2C%20users%20current%20new%20files%20are%20%3CFONT%20color%3D%22%23FF0000%22%3E%3CU%3E%3CSTRONG%3Ereplaced%3C%2FSTRONG%3E%3C%2FU%3E%26nbsp%3B%3C%2FFONT%3Ewith%20files%20from%20OneDrive.%3C%2FLI%3E%0A%3CLI%3ECurrent%20files%20are%20gone.%26nbsp%3B%20Not%20in%20any%20recycle%20bin%2C%20nor%20version%20history%20(OneDrive%20history%20and%20windows%20file%20history)%3C%2FLI%3E%0A%3C%2FUL%3E%0A%3CP%3E%26nbsp%3B%3C%2FP%3E%0A%3CP%3E%3CSTRONG%3EHow%20to%20replicate%20issue%3A%3C%2FSTRONG%3E%3C%2FP%3E%0A%3COL%3E%0A%3CLI%3EAdd%20a%20user%20to%20the%20GPO%20(as%20defined%20in%20link%20above).%26nbsp%3B%20Log%20user%20into%20%3CSTRONG%3EComputer%201%3C%2FSTRONG%3E.%3C%2FLI%3E%0A%3COL%3E%0A%3CLI%3E-%26gt%3B%20Add%20pictures%20001.jpg%E2%80%A6%20010.jpg%20to%20picture%20folder%3C%2FLI%3E%0A%3CLI%3E-%26gt%3B%20log%20into%20OneDrive%20(first%20time%20setup)%3C%2FLI%3E%0A%3CLI%3E-%26gt%3B%20reboot%20computer%20for%20folder%20redirection%20GPO%20to%20take%20effect%3C%2FLI%3E%0A%3CLI%3E-%26gt%3B%20Folders%20are%20redirected%20to%20OneDrive!%3C%2FLI%3E%0A%3CLI%3E-%26gt%3B%20OneDrive%20Sync%E2%80%99s!%3C%2FLI%3E%0A%3CLI%3E-%26gt%3B%20Everything%20works%20as%20expected%3C%2FLI%3E%0A%3C%2FOL%3E%0A%3CLI%3ENow%2C%20on%20%3CSTRONG%3EComputer%202%3C%2FSTRONG%3E%20(does%20not%20have%20OneDrive%20configured)%3C%2FLI%3E%0A%3COL%3E%0A%3CLI%3E-%26gt%3B%20Folder%20redirection%20doesn't%20run%20as%20%22Known%20Folder%22%20doesn't%20exist%3C%2FLI%3E%0A%3CLI%3E-%26gt%3B%20Add%20%3CSTRONG%3ENEW%3C%2FSTRONG%3E%20%3CEM%3Edifferent%3C%2FEM%3E%20pictures%20001.jpg%E2%80%A6%20010.jpg%20to%20picture%20folder%3C%2FLI%3E%0A%3CLI%3E-%26gt%3B%20log%20into%20OneDrive%20(first%20time%20setup)%3C%2FLI%3E%0A%3CLI%3E-%26gt%3B%20reboot%20computer%20for%20folder%20redirection%20GPO%20to%20take%20effect%3C%2FLI%3E%0A%3CLI%3E-%26gt%3B%20Folders%20are%20redirected%20to%20OneDrive!%3C%2FLI%3E%0A%3CLI%3E-%26gt%3B%20OneDrive%20Sync%E2%80%99s!%3C%2FLI%3E%0A%3CLI%3E-%26gt%3B%20New%20pictures%20are%20%3CSTRONG%3EGONE%3C%2FSTRONG%3E%20(replaced%20by%20pictures%20in%20Step%201)%3C%2FLI%3E%0A%3C%2FOL%3E%0A%3C%2FOL%3E%0A%3CP%3E%26nbsp%3B%3C%2FP%3E%0A%3CP%3EHave%20you%20seen%20this%20before%3F%3C%2FP%3E%0A%3CP%3ECould%20you%20recommend%20some%20troubleshooting%20steps%3F%3C%2FP%3E%0A%3CP%3E%26nbsp%3B%3C%2FP%3E%0A%3CP%3EThanks%20in%20advance!%3C%2FP%3E%3C%2FLINGO-BODY%3E%3CLINGO-LABS%20id%3D%22lingo-labs-131730%22%20slang%3D%22en-US%22%3E%3CLINGO-LABEL%3EOneDrive%20for%20Business%3C%2FLINGO-LABEL%3E%3C%2FLINGO-LABS%3E%3CLINGO-SUB%20id%3D%22lingo-sub-145266%22%20slang%3D%22en-US%22%3ERe%3A%20OneDrive%20Folder%20Redirection%20-%20Data%20Loss!%3C%2FLINGO-SUB%3E%3CLINGO-BODY%20id%3D%22lingo-body-145266%22%20slang%3D%22en-US%22%3E%3CP%3EI%20believe%20your%20problem%20is%20that%20you%20are%20not%20allowing%20Computer%202%20to%20fully%20sync%20before%20rebooting%20and%20implementing%20folder%20redirection.%3C%2FP%3E%0A%3CP%3E%26nbsp%3B%3C%2FP%3E%0A%3CP%3EYou're%20always%20going%20to%20have%20a%20problem%20with%20duplicate%20filenames%20like%20this.%20But%2C%20if%20you%20allow%20OneDrive%20to%20fully%20sync%20first%2C%20then%20implement%20folder%20redirection%2C%20the%20new%20files%20on%20Computer%202%20should%20overwrite%20the%20files%20within%20the%20OneDrive%20folder%20and%20sync%20those%20changes%20to%20the%20cloud%2C%20which%20will%20then%20sync%20and%20overwrite%20the%20files%20on%20Computer%201%20with%20Computer%202's%20versions.%3C%2FP%3E%0A%3CP%3E%26nbsp%3B%3C%2FP%3E%0A%3CP%3EYes%2C%20we%20are%20still%20clobbering%20files%2C%20but%20at%20this%20point%20you%20should%20be%20able%20to%20go%20in%20to%20OneDrive's%20version%20history%20and%20now%20pull%20out%20the%20other%20versions%20of%20the%20files.%20If%20you%20do%20this%20in%20the%20opposite%20order%2C%20i.e.%20you%20redirect%20folders%20and%20then%20allow%20OneDrive%20to%20sync%2C%20OneDrive%20is%20going%20to%20overwrite%20the%20local%20copy%20of%20the%20file%20and%20then%20you%20don't%20have%20any%20version%20history%20to%20work%20with.%3C%2FP%3E%0A%3CP%3E%26nbsp%3B%3C%2FP%3E%0A%3CP%3EBoth%20OneDrive%20and%20folder%20redirection%20will%20overwrite%20existing%20files%20in%20the%20destination%20folder.%20However%2C%20I%20can%20confirm%20it%20works%20exactly%20as%20I%20have%20described%20above.%3C%2FP%3E%0A%3CP%3E%26nbsp%3B%3C%2FP%3E%0A%3CP%3EWe%20are%20implementing%20this%20in%20two%20phases.%20The%20first%20phase%20is%20complete%20-%20this%20involved%20pushing%20OneDrive%20to%20all%20machines%20and%20getting%20all%20users%20signed%20in%20and%20synced.%20Phase%202%20will%20involve%20enabling%20folder%20redirection%3C%2FP%3E%3C%2FLINGO-BODY%3E%3CLINGO-SUB%20id%3D%22lingo-sub-131744%22%20slang%3D%22en-US%22%3ERe%3A%20OneDrive%20Folder%20Redirection%20-%20Data%20Loss!%3C%2FLINGO-SUB%3E%3CLINGO-BODY%20id%3D%22lingo-body-131744%22%20slang%3D%22en-US%22%3EYes%2C%20uncheck%20that%20option%20on%20the%20GPO%2C%20and%20have%20users%20manually%20move%20their%20data%20over%2C%20if%20they%20have%20similar%20filenames%2C%20move%20to%20a%20different%20folder%20inside%20OneDrive.%20otherwise%20your%20not%20guaranteed%20issues.%20%3CBR%20%2F%3E%3CBR%20%2F%3EI%20wish%20I%20had%20a%20better%20answer%20but%20when%20your%20talking%20duplicate%20filenames%20your%20sort%20of%20in%20trouble%20cause%20not%20everything%20is%20going%20to%20be%20different.%3CBR%20%2F%3E%3CBR%20%2F%3EOnly%20thing%20I%20could%20think%20of%20as%20well%20using%20some%20form%20of%20maybe%20using%20robocopy%20to%20find%20a%20command%20line%20that%20can%20do%20file%20compares%2C%20and%20if%20the%20file%20matches%20don't%20copy%2C%20but%20if%20it's%20different%20copy%20and%20rename%20if%20filename%20exists.%20But%20nothing%20built%20in%20will%20automatically%20do%20that%20for%20you%2C%20your%20going%20to%20have%20to%20come%20up%20with%20a%20flow%20manually%2C%20or%20with%20some%20form%20of%20script%20to%20hand%20out%20for%20folks%20to%20run%20to%20move%20that%20data%20in%20this%20given%20scenario.%3C%2FLINGO-BODY%3E%3CLINGO-SUB%20id%3D%22lingo-sub-131743%22%20slang%3D%22en-US%22%3ERe%3A%20OneDrive%20Folder%20Redirection%20-%20Data%20Loss!%3C%2FLINGO-SUB%3E%3CLINGO-BODY%20id%3D%22lingo-body-131743%22%20slang%3D%22en-US%22%3EThanks%20for%20the%20reply%20Chris.%20%3CBR%20%2F%3E%3CBR%20%2F%3EYes%2C%20the%20settings%20are%20correct.%20The%20case%20I'm%20describing%20was%20caught%20in%20testing.%20%3CBR%20%2F%3E%3CBR%20%2F%3EDo%20you%20know%20if%20this%20is%20'expected%20behaviour'%20of%20folder%20redirection%3F%20Is%20there%20a%20workaround%20to%20prevent%20data%20loss%3F%3CBR%20%2F%3E%3CBR%20%2F%3EThanks.%3C%2FLINGO-BODY%3E%3CLINGO-SUB%20id%3D%22lingo-sub-131736%22%20slang%3D%22en-US%22%3ERe%3A%20OneDrive%20Folder%20Redirection%20-%20Data%20Loss!%3C%2FLINGO-SUB%3E%3CLINGO-BODY%20id%3D%22lingo-body-131736%22%20slang%3D%22en-US%22%3EThe%20real%20question%20is%20how%20did%20you%20set%20this%20option%20in%20the%20GPO%20setup%2C%20cause%20it%20even%20warns%20you%20%3A).%20%3CBR%20%2F%3E%3CBR%20%2F%3E%22On%20the%20Settings%20tab%2C%20clear%20the%20Move%20the%20contents%20of%20Documents%20to%20the%20new%20location%20check%20box.%3CBR%20%2F%3E%3CBR%20%2F%3ENote%3A%20Leaving%20this%20setting%20enabled%20could%20result%20in%20data%20loss%20when%20the%20contents%20of%20the%20Documents%20folder%20is%20merged%20with%20the%20OneDrive%20folder%2C%20if%20there%20are%20files%20with%20the%20same%20name%20in%20both%20locations.%22%3CBR%20%2F%3E%3CBR%20%2F%3EIf%20you%20didn't%20enable%20this%2C%20then%20your%20files%20will%20still%20be%20on%20the%20computer%20in%20the%20old%20folder%20location%20c%3A%5Cusers%5Cusername%5Cdesktop%20(or%20documents%20etc).%20%3CBR%20%2F%3E%3CBR%20%2F%3EIf%20you%20did%2C%20then%20your%20probably%20looking%20at%20backups%20which%20I%20hope%20you%20have%20a%20client%20backup%20solution%20%3A(.%20Assuming%20you%20said%20you%20checked%20previous%20versions%20tab%20as%20well%20(check%20previous%20version%20of%20the%20root%20profile%20folder%20and%20then%20check%20desktop%2Fdocuments%20folder).%3C%2FLINGO-BODY%3E
New 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