Rclone and radarr

What is the problem you are having with rclone?

Hello, my Rclone works fine, however i just need some adivce. My folder structure in my local folder is gmedia-local/Movies and gmedia-local/Tv
When rclone moves the files to my Google drive it deletes the Movies and Tv Folder which causes issues for my clients as the folder is no longer avaliable.
How can i tell rclone to upload the folder TV and MOVIES but delete whats inside them if there empty but leaving Movies and TV in place.

Also while am asking for advice.. I have Radarr and sonarr install on my seedbox. how do i change the folder it imports to. For example currently it imports from files from /downloads and put its in /gmedia. However i want it in /gmedia-loca.

What is your rclone version (output from rclone version)

Which OS you are using and how many bits (eg Windows 7, 64 bit)

ubuntu 18.04

Which cloud storage system are you using? (eg Google Drive)

Google Drive

The command you were trying to run (eg rclone copy /tmp remote:tmp)

Paste command here
0 00 * * */1 /usr/bin/rclone move /home/seedit4me/mnt/gmedia-local gdrive-media-crypt: --config /home/seedit4me/.config/rclone/rclone.conf --log-file /home/seedit4me/opt/rclone/logs/upload.log --log-level INFO --delete-empty-src-dirs --fast-list --min-age 6h --drive-stop-on-upload-limit --min-age 3d --max-transfer 700G

The rclone config contents with secrets removed.

Paste config here

[gdrive-media]
type = drive
client_id =
client_secret =
scope = drive
root_folder_id =
token =

[gdrive-media-crypt]
type = crypt
remote = gdrive-media:/media
filename_encryption = standard
directory_name_encryption = true
password =
password2 =

You have

So you'd want to run that command from the root of each Movie/TV folder so run twice as you are deleting any empty directories so if you run it at a level above, it'll delete them since they are empty.

My setup/workflow is here to give you an idea of how I tackle those items:

thank you for the reply.
So how do i tell it to remove empty dirs per folder?

so i just do
--delete-empty-src-dirs /mnt/gmedia-local/Movies --delete-empty-src-dirs /mnt/gmedia-local/tv

I have been following you guide and another guide to get me setup which with out ur guide id never been working for that i thank you.
However ive not seen in there of ur flow how you link radarr...
I see you point it to local? however i want mine to import to local and scan the merg folder so it does not duplicate/redownload them once its uploaded to gdrive.

I test everything with --dry-run to validate so I'd make one for Movies and one for TV:

felix@gemini:~/test$ rclone move /home/felix/test GD: -vv --dry-run --delete-empty-src-dirs
2021/06/09 08:23:22 DEBUG : Using config file from "/opt/rclone/rclone.conf"
2021/06/09 08:23:22 DEBUG : rclone: Version "v1.55.1" starting with parameters ["rclone" "move" "/home/felix/test" "GD:" "-vv" "--dry-run" "--delete-empty-src-dirs"]
2021/06/09 08:23:22 DEBUG : Creating backend with remote "/home/felix/test"
2021/06/09 08:23:22 DEBUG : Creating backend with remote "GD:"
2021/06/09 08:23:22 DEBUG : GD: detected overridden config - adding "{xDYYC}" suffix to name
2021/06/09 08:23:22 DEBUG : fs cache: renaming cache item "GD:" to be canonical "GD{xDYYC}:"
2021/06/09 08:23:22 NOTICE: TV/test2: Skipped move as --dry-run is set (size 0)
2021/06/09 08:23:22 NOTICE: Movies/test: Skipped move as --dry-run is set (size 0)
2021/06/09 08:23:22 DEBUG : Google drive root '': Waiting for checks to finish
2021/06/09 08:23:22 DEBUG : Google drive root '': Waiting for transfers to finish
2021/06/09 08:23:22 NOTICE: TV/Three: Skipped remove directory as --dry-run is set
2021/06/09 08:23:22 NOTICE: TV/Four: Skipped remove directory as --dry-run is set
2021/06/09 08:23:22 NOTICE: TV: Skipped remove directory as --dry-run is set
2021/06/09 08:23:22 NOTICE: Movies/Two: Skipped remove directory as --dry-run is set
2021/06/09 08:23:22 NOTICE: Movies/One: Skipped remove directory as --dry-run is set
2021/06/09 08:23:22 NOTICE: Movies: Skipped remove directory as --dry-run is set
2021/06/09 08:23:22 DEBUG : Local file system at /home/felix/test: deleted 6 directories
2021/06/09 08:23:22 INFO  : There was nothing to transfer
2021/06/09 08:23:22 NOTICE:
Transferred:   	         0 / 0 Bytes, -, 0 Bytes/s, ETA -
Checks:                 2 / 2, 100%
Deleted:                0 (files), 6 (dirs)
Renamed:                2
Elapsed time:         0.3s

2021/06/09 08:23:22 DEBUG : 5 go routines active
felix@gemini:~/test$ rclone move /home/felix/test/Movies GD: -vv --dry-run --delete-empty-src-dirs
2021/06/09 08:23:31 DEBUG : Using config file from "/opt/rclone/rclone.conf"
2021/06/09 08:23:31 DEBUG : rclone: Version "v1.55.1" starting with parameters ["rclone" "move" "/home/felix/test/Movies" "GD:" "-vv" "--dry-run" "--delete-empty-src-dirs"]
2021/06/09 08:23:31 DEBUG : Creating backend with remote "/home/felix/test/Movies"
2021/06/09 08:23:31 DEBUG : Creating backend with remote "GD:"
2021/06/09 08:23:31 DEBUG : GD: detected overridden config - adding "{xDYYC}" suffix to name
2021/06/09 08:23:31 DEBUG : fs cache: renaming cache item "GD:" to be canonical "GD{xDYYC}:"
2021/06/09 08:23:31 NOTICE: test: Skipped move as --dry-run is set (size 0)
2021/06/09 08:23:31 DEBUG : Google drive root '': Waiting for checks to finish
2021/06/09 08:23:31 DEBUG : Google drive root '': Waiting for transfers to finish
2021/06/09 08:23:31 NOTICE: Two: Skipped remove directory as --dry-run is set
2021/06/09 08:23:31 NOTICE: One: Skipped remove directory as --dry-run is set
2021/06/09 08:23:31 DEBUG : Local file system at /home/felix/test/Movies: deleted 2 directories
2021/06/09 08:23:31 INFO  : There was nothing to transfer
2021/06/09 08:23:31 NOTICE:
Transferred:   	         0 / 0 Bytes, -, 0 Bytes/s, ETA -
Checks:                 1 / 1, 100%
Deleted:                0 (files), 2 (dirs)
Renamed:                1
Elapsed time:         0.2s

2021/06/09 08:23:31 DEBUG : 4 go routines active
felix@gemini:~/test$

Gottcha.. Spot on thank you :slight_smile: can now delete folders with the main folder haha

Hello,
I am sorry but either i am over thinking or am just totally thick LOL
My radarr keeps deleting my movies cause it thinks there a duplicate because its seeing it in my local and in my merge folder so i then end up with the file removed.

I have my download clients download to a downloads folder.
Then i have my root folder set as my local dir.
Plex is pointed to my merg dir.
what i dont understand is how i get radarr to move my files from downloads to the local dir and monitor my merg dir with out seeing them as duplicates.

My thoughts are once is goes to local dir and its then uploaded to gdrive radarr will then see it as missing cause its uploaded and thus re download.

i've followed ur guide but this is the only part that confuses the hell out of me..

So in my case, I have a merged combination of a local directory and a rclone mount.

We can call that /merged

That's made up of a local disk we can call /local and a rclone mount called /rclone

Sonarr/Radarr/Plex all point to /merged and any action on with any application on ever happens on /merged

For the upload script, that's the only thing that looks at /local as it has to move files from the local disk to the rclone remote.

So since the apps point to /merged, they never know if it's actually on /local or /rclone.

In my case, /gmedia = /merged, /local = /local and /GD = /rclone so my move script only ever touches /local.

thank you for the explanation.
within radarr which settings do you use to point to /merged?
Also how do you get the files to /local? do you download straight to local?
I have the 3 folder setup like you
/merged which is /local and /GD
i have my /local folder
and my /GD folder
Do i point root folder to /merged? with in radarr and media managment?
Do i think download to local direct from my download client so that my upload script puts the straight onto the cloud.
With regards to the renaming and importing built into radarr whats stopping radarr from renaming and moving the files downloaded to the /merged folder..
I am sorry am asking these question but this is where am struggling and yes i feel dumb.

In Radarr, you just point your root path to /merged

No, like I shared before all applications point to /merged, nothing points to /local. The mergerfs policy I use always writes to /local.

Everything points to /merged always.

Everything downloads to /merged

Media management is no different from anything else as if you aren't familiar with how Radarr/Sonarr works, that might something new to you as well. Regardless of paths Radarr/Sonarr copy media from a download location to a final location

Sonarr/Radarr may download to /merged/download/SomeMovie/Movie.mkv and how those tools work is once they identify it's done, it copies that from the download area to your final area so /merged/download/SomeMovie/Movie.mkv gets copied to /merged/Plex/SomeMovie/FullMovieNameTitle.mkv

Everyone starts with no knowledge on this stuff and the only way to learn is by asking questions. I wouldn't feel dumb for asking as that's how we learn. My setup has been going on for quite some time and has a lot of polish and is well suited for my particular use case and setup and it works in a fully automated fashion. That didn't happen in a few days as it took quite some time to get where I am now by breaking things and asking quite a lot of questions.

ok i full understand that now :slight_smile:
i think my issue is with OMBI and it telling the files to go to to incorrect DIR based on the root folder which is causing my issue...

This topic was automatically closed 60 days after the last reply. New replies are no longer allowed.