Jump to content
cracksilver

Rclone sync with google drive

19 posts in this topic Last Reply

Recommended Posts

Hi forum

 

At my very last step to my perfect server i stock with the following.

 

Installed Rclone beta with the very good video from spaceinvaders. Did everything like he has done to mount google drive in the folder /mnt/disks/google-drive. Set the smb extra lines, mount and unmountscripts like in the descreption below the video Now I can see the share "google-drive" in the finder on my macbook. Actually fine so far. But it is unbelievable slow and stocks allways again and again.

 

I´m not shure it is the right way. Do I have to set something like a sync command in the config or custom script to make shure there is a local copy?

 

My goal is tho sync two ways from google drive to in a folder in unraid. Share this folder and connct every user/machine to this folder. Tried the half night to figuered out how it works - unfortunately unsuccessful.

 

thanks for any advice that goes in the right direction.

 

cracksilver

 

 

 

Share this post


Link to post

Or is ther another way to reach the goal sync local folder exactly with google drive? I'm open to any solution, at least it works proberly.

 

The searching in forums and google looks like there are many people want's that and have the same problems.

 

thank you

cracksilver

Share this post


Link to post

I use a rclone vfs mount to stream files including 4k files absolutely fine with lots of plex activity, so I guess it will work fine for smaller files.  Try:

 

rclone mount --rc --allow-other --buffer-size 1G --dir-cache-time 72h --drive-chunk-size 256M --fast-list --log-level INFO --vfs-read-chunk-size 128M --vfs-read-chunk-size-limit off YOUR_REMOTE: /mnt/user/mount_path

rclone rc --timeout=1h vfs/refresh recursive=true

Taken from 

 

If you're uploading a lot of files direct via the mount try a cache mount

 

https://rclone.org/cache/

 

 

 

Share this post


Link to post

thx for this input. Just tried with new mount code after a complete reboot.

Same issue again. It takes at least 3-5 min till the contest is visible in finder...

 

Is it usefull for you look at my config? 

 

Share this post


Link to post

thx for that

 

rclone config:

[google-drive]
type = drive
scope = drive
chunk_size = 8M
token = {"access_token":"xxxxxxxxxxxxxxxxxxxxxxxxxxx","token_type":"Bearer","refresh_token":"1/xxxxxxxxxxxxxxxxxxxxxxxxxxx","expiry":"2018-11-28T16:15:57.072128273+01:00"}

rclone mount script:

rclone mount --rc --allow-other --buffer-size 1G --dir-cache-time 72h --drive-chunk-size 256M --fast-list --log-level INFO --vfs-read-chunk-size 128M --vfs-read-chunk-size-limit off google-drive: /mnt/disks/google-drive &

rclone rc --timeout=1h vfs/refresh recursive=true

rclone unmount script:

fusermount -u /mnt/disks/google-drive

tower-diagnostics-20181128-1609.zip

Share this post


Link to post

hi DZMM

 

Did the procedure with own client-id. Created new rclobe config. Same issue. Actually worse than before, cant't see any files in share. Ends up in error 8058.

 

is there any other solution to make two-way sync with google drive? This one it just doesn't work for me...

 

cracksilver

Share this post


Link to post

You could try a cache mount, but I don't think that will help and I think the problem lies elsewhere e.g. your mac or your network. 

 

I'd recommend posting some logs over on the rclone forum as something odd is going on.

Share this post


Link to post

also with cache mount it goes not faster. The network breaks down at the moment i click on google-drive share.

 

I tried everything out last night and during this day. I gave up and go another way. Install a light debian in VM and run insync inside as soon there is sadly no docker for it. I just have to figuered out how to mount a user share directly in to the vm. Are there any thougts?

 

Thank you again

Share this post


Link to post

Edit the debian VM's /etc/fstab file and add the following line

 

//unraidservername/unraidsharename /vmmountpoint    cifs    file_mode=0777,dir_mode=0777,_netdev,username=unraiduser,password=unraiduserpassword,uid=1000,gid=1000    0    0

 

Make sure the /vmmountpoint folder, whatever and wherever you choose, has appropriate permissions.

Share this post


Link to post

Thank you jonathanm ;-)

 

Perfect. It is syncing now with Insync on a Debian VM to my usershare in unRaid.

By the way, insync works really fast and realtime, like the native google sync tool.

 

thx everybody for helping.

cracksilver

Share this post


Link to post

Strange things happen here. There was a post where somebody asked for single steps.... now I want to answer, but the post is gone...

 

One thing I can say after testing the two-way-sync with isync tool. It has a powerful delay when synchronizing. Sometimes it goes after a change half a day until synchronized. Sometimes I have to trigger it manually. of course this is not the way I like it.

 

I have to look at rclone again...

Current status: I have 2 directories which I want to synchronize. One is in google drive and one on a share on the server. Both have exactly the same content. Is it possible with rclone or does the target directory have to be empty for rclone?

 

thx cracksilver

Share this post


Link to post
On 12/4/2018 at 5:14 AM, cracksilver said:

Strange things happen here. There was a post where somebody asked for single steps.... now I want to answer, but the post is gone...

 

One thing I can say after testing the two-way-sync with isync tool. It has a powerful delay when synchronizing. Sometimes it goes after a change half a day until synchronized. Sometimes I have to trigger it manually. of course this is not the way I like it.

 

I have to look at rclone again...

Current status: I have 2 directories which I want to synchronize. One is in google drive and one on a share on the server. Both have exactly the same content. Is it possible with rclone or does the target directory have to be empty for rclone?

 

thx cracksilver

Hey Quicksilver, did you ever get this sorted? Hoping for a way to set up proper 2 way syncing to google drive in my future build without running essentially a dedicated VM to do it. 

Share this post


Link to post
1 hour ago, LintHart said:

Hey Quicksilver, did you ever get this sorted? Hoping for a way to set up proper 2 way syncing to google drive in my future build without running essentially a dedicated VM to do it. 

rclone sync will do the job and you can run the job on a cron schedule using Custom User Scripts

Share this post


Link to post

Join the conversation

You can post now and register later. If you have an account, sign in now to post with your account.
Note: Your post will require moderator approval before it will be visible.

Guest
Reply to this topic...

×   Pasted as rich text.   Restore formatting

  Only 75 emoji are allowed.

×   Your link has been automatically embedded.   Display as a link instead

×   Your previous content has been restored.   Clear editor

×   You cannot paste images directly. Upload or insert images from URL.