Following Symlinks

I have a folder in which i place links to folders i want to upload these to my google drive. if GD doesn’t have the ablilty to create symlinks i would like to instead upload the files to both places (have 2 copies of the files) . Is there a way to have symlinks followed via the headless client?

@Dylan_Thurston1: If you add a symlink to a folder inside your Insync folder then the target of that symlink will be synced to your Google Drive account. Could you clarify what you meant by uploading the files to both places?

here is my structure, in my insync folder in my home directory i have a symlink to my actual file mount so
/home/insync/ → /mnt/RaidZ/
in my mnt/Raidz/ there are a bunch of files but the one that concerns me is that i have a folder called movies. in the movies folder i have folders for all movies and kids movies
/mnt/RaidZ/Movies/All and mnt/RaidZ/Movies/Kids, rather than keep two copies in my file server i create links from movies in the all folder to links in the kids folder. for example
/mnt/RaidZ/Movies/All/Movie 1
/mnt/RaidZ/Movies/All/Movie 2
/mnt/RaidZ/Movies/All/Movie 3
/mnt/RaidZ/Movies/All/Movie 4

now in the kids folder Movies 2 and 4 are kids movies so in mnt/RaidZ/Movies/Kids i:
ln -s …/All/Movie\ 2 ./
ln -s …/All/Movie\ 4 ./

now in the kids folder i have symlinks to things in the all folder.
/mnt/RaidZ/Movies/kids/movie 2 → …/All/movie 2
/mnt/RaidZ/Movies/kids/movie 4 → …/All/movie 4

right now in my google drive nothing shows in the kids folder. I’m guessing that this is because google drive doesn’t allow for symlinks. can insync just upload folders in the kids folder as if the files actually existed there and wasn’t a symlink or is it possible to have those symlinks work in gdrive. I want my gdrive to have files in the kids folder without duplicating them on my personal server (i have plenty of space in gdrive so i don’t care if there are copies of the files in two places for those folders. Does that make sense?

@Dylan_Thurston1: I see. Thanks for the explanation. I think the cause is that you have symlinks in /mnt/RaidZ/Movies/Kids that point to paths that are under /mnt/RaidZ. Targets of symlinks under the Insync folder are considered as syncing locations, and Insync has a limitation that a syncing location cannot contain paths that are under other syncing locations.

I’m not sure i follow the last part, but what are my options for syncing those folders in /mnt/RaidZ/Movies/Kids. I would really like to avoid having real 2x copies within my own file system.those directories are fairly large and that would take up a lot of extra space on my fileserver (hence using symlinks) would using relative hardlinks work? Is it possible to make a mountpoint(nfs or something) to the kids folder and have that synced. technically in gdrive i don’t have to have the kids folder inside the movies folder, it can just be in another location. (i can use gdrive space more than local space) Any ideas?

Ok i figured out a way to do it. I’m not sure if there is a native way to handle symlinks, but i found a hack to get it to work.

i mount the folder with symlinks via smb/cifs, i had to make sure the options: nounix on the mount and follow symlinks=yes,wide_links=yes on the server This will allow samba/cifs to follow symlinks that are outside of the mounted paths. now the folders under Kids (movies and tv) act just like normal folders/files. Hopefully insync will sync these cifs mountpoints.

I hope this helps someone since it took me so long to figure it out.

That worked. all of my symlinks are seen as unique files so they got uploaded.YAY i’m not sure how many people, if any, will need to do something similar but this way works great now i have my kids content linked with no additional local storage.