Guide: How To Use Rclone To Mount Cloud Drives And Play Files


DZMM

Recommended Posts

1 minute ago, tmoran000 said:

[Gdrive_Backup]
type = drive
scope = drive
token = (removed)
team_drive = (removed)

[Gdrive_SecureEN]
type = crypt
remote = Gdrive_Backup:Secure
filename_encryption = standard
directory_name_encryption = true
password = (removed)
password2 = (removed)

[Gdrive_Stream]
type = drive
scope = drive
token = (removed)
team_drive = (removed)

[Gdrive_StreamEN]
type = crypt
remote = Gdrive_StreamEN:Secure
filename_encryption = standard
directory_name_encryption = true
password = (removed)
password2 = (removed)

 

 

this is what was built from putting the info in through SSH

You made the crypt for Streaming point at itself. You put StreamEN instead of Stream.

Link to comment

I am sorry that I am so confused over all of this. but the number of names it requires doesnt make sense to me.. It has me name it (Gdrive_Stream) which is what.. the Team drive name? and then it has me make a crypt (Gdrive_StreamEN) What is this? the folder inside the Team drive called Gdrive_Stream . or is Gdrive_StreamEN:Secure...is Secure the name of the folder inside of the Team Drive titled Gdrive_Stream... its a Team Drive named Gdrive_Stream with a folder inside called Secure where I want the files to be stored but the config has me using 3 names all different so I am getting so confused. I looked through the tutorial at the beginning and still does not make sense.. ugh I feel like such a bother to keep asking all these questions.. 

Screen Shot 2019-02-13 at 4.10.56 PM.png

Edited by tmoran000
Link to comment
1 minute ago, tmoran000 said:

I am sorry that I am so confused over all of this. but the number of names it requires doesnt make sense to me.. It has me name it (Gdrive_Stream) which is what.. the Team drive name? and then it has me make a crypt (Gdrive_StreamEN) What is this? the folder inside the Team drive called Gdrive_Stream . or is Gdrive_StreamEN:Secure...is Secure the name of the folder inside of the Team Drive titled Gdrive_Stream... its a Team Drive named Gdrive_Stream with a folder inside called Secure where I want the files to be stored but the config has me using 3 names all different so I am getting so confused. I looked through the tutorial at the beginning and still does not make sense.. ugh I feel like such a bother to keep asking all these questions.. 

No worries, it is confusing at first.

 

So in your webui you created 2 team drives. Call them whatever you want. I don't like to give Google too much of an incline what I'm doing so I just name them Backup and Files.

 

Within the team drive you create the folder. This name is important and in your case would be Secure for both team drives. So I think if you just create 1 folder in each team drive through the webui called Secure you got it working. Might need to unmount first before remounting.

 

Link to comment
10 minutes ago, Kaizac said:

Is the log saying anything when running the mounts?

this is the current log

 

###

Script Starting Wed, 13 Feb 2019 15:57:32 -0500

Full logs for this script are available at /tmp/user.scripts/tmpScripts/rclone_mount_plugin/log.txt

Script Finished Wed, 13 Feb 2019 15:57:32 -0500

Full logs for this script are available at /tmp/user.scripts/tmpScripts/rclone_mount_plugin/log.txt

Link to comment

i think i got it working, will have to take a little to check to make sure.

 

So the rclone_unionfs folder is where I will point Plex/Sonarr to.

 

Sonarr download folder and whatever else I want to upload to gdrive will be the rclone_upload folder.

 

When it finishing syncing, the files will appear in the unionfs folder, but they are dummy files taking no space on my actual unraid server.

 

After uploading, the files in rclone_upload folder will be deleted.

 

Do I have this correct?

Edited by mestep
Link to comment
1 minute ago, mestep said:

i think i got it working, will have to take a little to check to make sure.

 

So the rclone_unionfs folder is where I will point Plex/Sonarr to.

 

Sonarr download folder and whatever else I want to upload to gdrive will be the rclone_upload folder.

 

When it finishing syncing, the files will appear in the unionfs folder, but they are dummy files taking no space on my actual unraid server.

 

Do I have this correct?

Correct!

Link to comment

I have made a simple unmount script 

#!/bin/bash
#----------------------------------------------------------------------------
fusermount -uz /mnt/user/rclone_mount/Gdrive_Backup
fusermount -uz /mnt/user/rclone_mount/Gdrive_Stream

 

I know the tutorial has a much longer one but it seems way over done for me, I ran this unmount and reran the mount and still same issue occurs. file copies to the folder on my server so now I have 2 on my server and none on google

Link to comment

ran unmount with above script.. here is log

Quote

Script Starting Wed, 13 Feb 2019 16:41:00 -0500

Full logs for this script are available at /tmp/user.scripts/tmpScripts/rclone_unmount_plugin/log.txt

Script Finished Wed, 13 Feb 2019 16:41:00 -0500

Full logs for this script are available at /tmp/user.scripts/tmpScripts/rclone_unmount_plugin/log.txt

Then ran mount that we built and here is the mount

Quote

Script Starting Wed, 13 Feb 2019 16:42:06 -0500

Full logs for this script are available at /tmp/user.scripts/tmpScripts/rclone_mount_plugin/log.txt

Script Finished Wed, 13 Feb 2019 16:42:06 -0500

Full logs for this script are available at /tmp/user.scripts/tmpScripts/rclone_mount_plugin/log.txt
 

after I mount it, I open Krusader, Navigate to /mnt/user/rclone_mount/Gdrive_Backup . and move a file there and it just copies there locally

 

 

Screen Shot 2019-02-13 at 4.22.20 PM.png

Link to comment
Just now, tmoran000 said:

As far as I know. I set up Stream first and then Backup.. I used all the default configuration when it offered it. 

Like nuhll said, try a reboot after you unmount again and then run the mount commands through run in background.

 

If that doesn't work PM me your contact info like Discord or something and I'll get in touch.

Link to comment

 I spent two nights trying to get this to work and I'm finally just about there, thank you for this.

 Just 1 thing, when I delete files it is putting them back where I deleted them from.

I.e:

  • If I delete a file directly (this is how you are meant to delete media files right?)  from mount_unionfs>google_vfs/tvshows/Fawlty Towers....mkv
  • It goes into the

mount_unionfs>google_vfs>.unionfs>tvshows> folder (which I dont have access to unless I reset the permissions in Unraid to that folder)

(The .mkv is also now in the rclone_upload folder.)

  • So if I run the unionFS cleanup script, it gives the below output and then puts the file right back to where I deleted it from, any ideas please?

 

3.02.2019 23:30:43 INFO: starting unionfs cleanup.
rm: cannot remove '/mnt/user/mount_rclone/google_vfs/mnt/user/mount_unionfs/google_vfs/.unionfs/TVShows/Fawlty Towers - S01E01 - A Touch of Class - (1975) - h264-576p.mkv': No such file or directory
rm: cannot remove '/mnt/user/mount_rclone/google_tdrive_vfs/mnt/user/mount_unionfs/google_vfs/.unionfs/TVShows/Fawlty Towers - S01E01 - A Touch of Class - (1975) - h264-576p.mkv': No such file or directory
Script Finished Wed, 13 Feb 2019 23:30:43 +0000

 

 

Edit: PS I am using teamdrive and the UnionFS cleanup script from the original post.

Edited by shimlapinks
clarification
Link to comment
6 hours ago, shimlapinks said:

 I spent two nights trying to get this to work and I'm finally just about there, thank you for this.

 Just 1 thing, when I delete files it is putting them back where I deleted them from.

I.e:

  • If I delete a file directly (this is how you are meant to delete media files right?)  from mount_unionfs>google_vfs/tvshows/Fawlty Towers....mkv
  • It goes into the

mount_unionfs>google_vfs>.unionfs>tvshows> folder (which I dont have access to unless I reset the permissions in Unraid to that folder)

(The .mkv is also now in the rclone_upload folder.)

  • So if I run the unionFS cleanup script, it gives the below output and then puts the file right back to where I deleted it from, any ideas please?

 

3.02.2019 23:30:43 INFO: starting unionfs cleanup.
rm: cannot remove '/mnt/user/mount_rclone/google_vfs/mnt/user/mount_unionfs/google_vfs/.unionfs/TVShows/Fawlty Towers - S01E01 - A Touch of Class - (1975) - h264-576p.mkv': No such file or directory
rm: cannot remove '/mnt/user/mount_rclone/google_tdrive_vfs/mnt/user/mount_unionfs/google_vfs/.unionfs/TVShows/Fawlty Towers - S01E01 - A Touch of Class - (1975) - h264-576p.mkv': No such file or directory
Script Finished Wed, 13 Feb 2019 23:30:43 +0000

 

 

Edit: PS I am using teamdrive and the UnionFS cleanup script from the original post.

I had/have the same problem which I'm still trying to work out. But the .unionfs folder is sort of like a recycling bin. The errors you get are caused because you don't have permission to the folder. The only way to get this fixed is running the safe permissions on the share. Run it on the right share though where the problem is. In your case this is probably the rclone_upload/google_vfs folder.

 

 

6 hours ago, mestep said:

So it looks like things move from the upload folder instantly to the union folder. Is this the way it should be?

 

Also how do I know that files are getting uploaded and are off my local unraid box?

The union folder shows both your cloud files as your local files (which are in your upload folder) so it's not moving anything to the union since the union does not contain any files itself. Upload of your local files is done through the upload script. So if that one runs you know it's uploading. And if you want to see how much files are still stored locally you can just check the rclone_upload folder.

  • Like 1
Link to comment
7 hours ago, Kaizac said:

The union folder shows both your cloud files as your local files (which are in your upload folder) so it's not moving anything to the union since the union does not contain any files itself. Upload of your local files is done through the upload script. So if that one runs you know it's uploading. And if you want to see how much files are still stored locally you can just check the rclone_upload folder.

 

I don't mean to sound stupid or anything. If I put stuff in the union folder instead of the upload folder, it will still get uploaded to the cloud, right? Right now I have sabnzbd set to download to the upload folder, can/should I have it set to download to union?

Link to comment

As far as i know there are 2 ways to add data.

 

direct way is to put it into the combined folder of your remote and local storage (should be union folder) - it gets direct streamed (uploaded) if something goes wrong, data may be lost.

 

Better (safer) way is to upload it via script, e.g. the upload script on first post.

Edited by nuhll
Link to comment

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.