Google drive sync/mount? And Syncthing...

Have some feedback, questions, suggestions, or just fancy a chat? Pop it in here.
Post Reply
AnBad
Posts: 25
Joined: Sat Jan 12, 2019 4:40 pm

Google drive sync/mount? And Syncthing...

Post by AnBad »

Hi,

what is the best way to sync a folder at my raspberry with google drive?

Within my home network syncthing should sync my google drive between my PC/Notebook and my raspberry.

Kind regards.
Last edited by AnBad on Sat Mar 27, 2021 5:11 pm, edited 1 time in total.
AnBad
Posts: 25
Joined: Sat Jan 12, 2019 4:40 pm

Re: Google drive sync?

Post by AnBad »

Let me guess, its impossible to sync a google account on a DietPi system?
User avatar
ravenclaw900
Posts: 12
Joined: Sat Jan 09, 2021 4:05 pm

Re: Google drive sync?

Post by ravenclaw900 »

No, there are many methods. You could use https://github.com/vitalif/grive2, or rclone like https://medium.com/@artur.klauser/mount ... 002c7095c2.
AnBad
Posts: 25
Joined: Sat Jan 12, 2019 4:40 pm

Google drive sync/mount? And Syncthing...

Post by AnBad »

I have installed rclone. In addition I had to install the package: apt-get install fuse. Furthermore I had to add an test user (my email Adresse) at the Goolge Cloud Plattform/OAuth consent screen so that rclone could be certified by google and get access.

Two things I couldn't manage to run:
  • The autostart with systemd. I got stuck at the point where to create a link. I even didn't find the the folder: $HOME/.config/systemd/user which is needed as the tutoriol says. So I tried the folder "/etc/systemd/system". This folder I already know as a noob and would prefer therefor. But did not succeed. systemctl --user enable rclone@gdrive is giving the error: Failed to connect to bus: No such file or directory. Nonetheless the idea behind the tutorial to work with systemd templates is a very good one which I would like to get running. Has anybody an idea how to solve this?
  • Therefor I started rclone manually to give it a test. Everything mounts perfect. I can list all files and so on. But I gave syncthing a try. I didn't work out, because of some permission issue. Is it even possible with Syncthing? What to do about the permissions?

    2021-03-27 16:48:10: Loading ignores: lstat /mnt/gdrive/.stignore: permission denied
    2021-03-27 16:48:10: Failed to create folder root directory stat /mnt/gdrive: permission denied
    2021-03-27 16:48:10: Error on folder "gdrive" (wrgj5-dfhfj): stat /mnt/gdrive: permission denied
Thank you.
Attachments
Google Cloud Platform, Add Test User.png
User avatar
Joulinar
Posts: 4249
Joined: Sat Nov 16, 2019 12:49 am

Re: Google drive sync/mount? And Syncthing...

Post by Joulinar »

if you followed the guide and created the rclone@.service service file, you should be able to start the service like

Code: Select all

systemctl --user start rclone@gdrive
To have the service running on boot, it would need to be enabled. This will create the sym link automatically

Code: Select all

systemctl --user enable rclone@gdrive


Syncthing is executed as user dietpi. Therefore you would need to allow r/w access to this user to /mnt/gdrive/
Pls let us know if a solution is working. This could help others if they hit by similar situation. Your DietPi Team
Post Reply