Sync Directory Symbolic Link with Google Backup and Sync

backupgoogle-syncsymbolic-linksync

In my Backup and sync folder on my computer, I have created several directory symbolic links so that the files on the "real" location can be backup on my google drive.
The directory symbolic links were created like that :

mklink /D "C:\Users\Me\Desktop\google\Notepad++" "C:\Users\Me\AppData\Roaming\Notepad++"

These directory symbolic links aren't uploaded to my google drive by Google Backup and Sync.

Is there a way to force Backup and Sync to upload directory symbolic links? If not how can I backup some of my appdata files?

I would like a solution that is free and which doesn't involve a third party.

I have already found a solution with a python script that is able to follow directory symbolic links but I would like a more robust solution.

Best Answer

Ok so the trick is with which one is the link, and which one is the true folder. Google Drive does not sync the link, it syncs the true folder. So you need to reverse the order. I have not tried it with /D but using /J works fine. So these changes applied to your original method as shown below should work:

mklink /J "C:\Users\Me\AppData\Roaming\Notepad++" "C:\Users\Me\Desktop\google\Notepad++" 

This is a bit annoying and dangerous, as if your folder in Google Drive is deleted, the files on your computer disappear as well. So accidentally deleting the folder in Google Drive from another location makes the link point to nothing, completely wiping the original data.

It could also cause trouble for other programs that have trouble working with symbolic locations.

If you are willing to ditch Google Drive, Dropbox works with what you proposed initially.

Related Question