5

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.

  • For the record, www.dropbox.com does what you want: the PC sync client follows symlinks (but does not monitor their contents: you need to restart the client for it to re-sync past symlinks). – PPC Jan 31 at 11:49
1
+50

I think that Google Backup and Sync does not follow symbolic links, so another solution is required.

My idea is that, instead of syncing via Google Backup and Sync, to use a product that can make your Google Drive directly accessible from the computer, then use any other sync product to sync your folders.

The products that might be a solution are (you will need to test and see) :

Once you have direct access to your Google Drive, you only need a sync product that matches you needs. Here are some suggestions :

  • Thanks a lot for this answer. I don't want to use third-party and I would like a free solution (sorry for not being more precise about those two conditions in my question). But it may help others who are not constrained by the same conditions. – MagTun Dec 25 '17 at 13:12
  • There are some free products in my list. I'm afraid that the only solution without third-party products is to move or duplicate your folders into the Google folder. – harrymc Dec 25 '17 at 13:36
  • Python is also a third-party product ... – harrymc Dec 25 '17 at 14:29
  • You're right... any third-party except pytho ;-) (I am actually asking this question to using python!) – MagTun Dec 25 '17 at 14:29
  • Once Google Drive is locally accessible on your computer, you may access it with any program of your choice, even Python ;) – harrymc Dec 25 '17 at 16:51
1

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.

0

To sync directory symbolic links with Google drive, I ended up using rclone with this command:

rclone sync "C:\Users\Me\Desktop\google\Notepad++"  "myremote":"folder"  --copy-links 

While it doesn't answer my question about Google Backup and Sync, I am satisfied because I can keep my Google Drive and my symbolic links.

Your Answer

By clicking "Post Your Answer", you acknowledge that you have read our updated terms of service, privacy policy and cookie policy, and that your continued use of the website is subject to these policies.

Not the answer you're looking for? Browse other questions tagged or ask your own question.