Sync selected /home files to Google Drive

Questions about applications and software
Forum rules
Before you post read how to get help. Topics in this forum are automatically closed 6 months after creation.
Post Reply
ozalba
Level 1
Level 1
Posts: 17
Joined: Fri Mar 22, 2024 8:34 am
Location: Queensland, Australia
Contact:

Sync selected /home files to Google Drive

Post by ozalba »

I can see multiple queries about syncing to Google Drive, and this question viewtopic.php?t=243721 seems to suggest the closest solution, using google-drive-ocamlfuse (I think it's called "mounting Google Drive in a local folder", as per viewtopic.php?t=406367), but I'm still unclear about whether it it automatically syncs any changed files (within the subset flagged for syncing), or whether I'll need to put files into a dedicated folder below /home, in order to achieve this (thereby upsetting my normal file storage structure—though maybe I need to take a fresh look at that anyway).

For clarity: I'm still setting up my installation as I want it (raw beginner, day 4 now), and intend to use something like LuckyBackup (I've already set up TimeShift) to maintain full local backups, but there are files I occasionally need to access while away from home, via my phone, which Drive sync enables me to do.

I'd appreciate any guidance on this. If it turns out that I can't have an automated sync like I had on Windows, then perhaps I can use an rsync script (something else I've still to investigate) as a bridge between my main file storage and a local Drive folder; having recently got back into using xcopy batch files in Windows, I'm comfortable with that method, and would be happy doing similar here.
User avatar
Wibol
Level 6
Level 6
Posts: 1384
Joined: Fri Nov 27, 2015 7:00 am
Location: España

Re: Sync selected /home files to Google Drive

Post by Wibol »

During the publication of the tutorial Mounting Google Drive in local folder I tried to create symbolic links in the ~/Gdrive folder pointing to the directories Documents, Images, etc... I also tried with a single file and the result was not good. In Google Drive a binary file was created with the name of the local, but then I was not able to edit it or just open it. The truth is that I did not investigate much more. Links can be soft and hard and I only tried the first type.

The command creates a soft link in Gdrive pointing to a file hosted in Documents:

Code: Select all

ln -s ~/Documents/test.txt ~/Gdrive/test.txt
It could also be done with a folder:

Code: Select all

ln -s ~/Documents/ ~/Gdrive/Documents
To create a hard link:

Code: Select all

ln -h ~/Documents/test.txt ~/Gdrive/test.txt
If none of that works you could do something similar to what is proposed in the tutorial Synchronize personal folders on multiple computers (sorry, only in Spanish), to make a copy of the Documents folder inside Gdrive, which would occupy twice the local disk space.

Translated with DeepL.com (free version)
Last edited by Wibol on Mon Mar 25, 2024 6:28 am, edited 1 time in total.
Image

No olvides:
  • Leer la Guía de publicación antes de hacer una consulta.
  • Añadir [SOLUCIONADO] al título del primer mensaje de tu consulta cuando así lo consideres.
ozalba
Level 1
Level 1
Posts: 17
Joined: Fri Mar 22, 2024 8:34 am
Location: Queensland, Australia
Contact:

Re: Sync selected /home files to Google Drive

Post by ozalba »

Gracias, Wilbol; I'm getting the feeling that I just can't use Drive as I used to. I think I need to reconsider what I'm actually trying to do, because I set up Drive for important backups before I'd rediscovered xcopy; I wouldn't necessarily use Drive if it weren't for that.

First: learn about rsync, and specifically rsync scripting—and hope it can do what I need. But not today. Today, I'm tired.

$ sudo book-open -lastpage
User avatar
AndyMH
Level 21
Level 21
Posts: 13759
Joined: Fri Mar 04, 2016 5:23 pm
Location: Wiltshire

Re: Sync selected /home files to Google Drive

Post by AndyMH »

As an alternative to gdrive have a look at pcloud:
https://www.pcloud.com/eu
It's a while since I had a play with it, I'm sort of averse to putting anything in the cloud. From memory I found it painless to install/setup, I had a local folder and anything in that folder was in the cloud. So it should work with any backup utility.

It is Swiss and you get 5GB free.
Thinkcentre M720Q - LM21.3 cinnamon, 4 x T430 - LM21.3 cinnamon, Homebrew desktop i5-8400+GTX1080 Cinnamon 19.0
Post Reply

Return to “Software & Applications”