5

I have a folder $HOME/important_folder that I want to have a backup of on Google Drive. The Google Drive is setup and mounted (under /run/user/1000/gvfs/google-drive:host=gmail.com,user=myUserName)

In order to leave the folder where it is while also being backed up, I want to create a symbolic link on the Google Drive that links to the normal location.

So I write this in my terminal:

cd $LOCATION_OF_G_DRIVE

ln -s $HOME/important_folder $PWD

The error I get:

ln: failed to create symbolic link '/run/user/1000/gvfs/google-drive:host=gmail.com,user=myUserName/important_folder': Operation not supported

So how do I achieve this task?

6
  • 1
    What Ubuntu version is this? How is this Google drive setup? Using online accounts? Use "edit" to add the info to your question.
    – vanadium
    Commented Jan 5, 2021 at 13:56
  • 1
    There may be some clues in this reference to backup to Google-Drive
    – graham
    Commented Jan 5, 2021 at 14:14
  • I prefer the rclone setup: rclone.org/drive
    – FedKad
    Commented Jan 5, 2021 at 14:38
  • @vanadium newest version. The GDrive is setup using the default Online Accounts functionality where I login with my Google account and enable Files.
    – Sorry
    Commented Jan 6, 2021 at 15:18
  • Add this essential information to your post: use "edit". Anyway, you cannot create symbolic links on such mounted network volumes. It is a mount, not a synchronized folder.
    – vanadium
    Commented Jan 6, 2021 at 16:35

1 Answer 1

2

As far as I know, the synchronism by GNOME is done via gio, which has the path google-drive://[email protected]/ on a GUI file manager, but it is actually stored at /run/user/... on your GNU/Linux filesystem.

GIO (Gnome Input/Output) seems to not be optimized to work on terminal. You can even navigate through your directories by using gio list -d google-drive://[email protected]/path/to/directory, but it does not seem possible to make more sophisticated stuffs, such as symlink...

In nutshell, if you are like me and have a full-based terminal workflow, then maybe you had better to use rclone, which is a terminal program that allows you to get a full control of your files from terminal. It is a little bit trickier to set this up, but it is much more powerful.

You must log in to answer this question.

Not the answer you're looking for? Browse other questions tagged .