Gdrive, unionfs-fuse, sonarr and a massive headache please help!

Hi back again with probably another silly question.
I’m currently running an Ubuntu dedicated server and have sonarr installed. I have been running Rclone copy to move my shows to Gdrive and removing them from the server later.
after reading …a lot I have installed unionfs-fuse and have a combined mount of my TV folder on Gdrive and my TV folder locally.
This is where it all goes wonky on me. in the union folder which i have called media I have two copies of everything, (but then this is probably right as i have mirrored the TV folder in Gdrive when using Rclone copy…) I am even managing to confuse myself writing this post :confounded:

Basically does anyone have any tips on how this should be set up? please! i really don’t like feeling this confused (even if it is self inflicted)
Many thanks

Here are the scripts I use:

There are 3:

  1. mount.acd: this mounts the UnionFS on ~/media, with the local folder beinng in ~/.media/local and the rclone ACD data (read-only) in ~/.media/acd-decrypted

  2. umount.acd: this unmounts the UnionFS and rclone mounts

  3. this moves the data from the local folder to ACD. I run this on a nightly basis at midnight.

Edit the files as necessary but these work great. You may want to take the --verbose out of the rclone mount. I do this for debugging but the log file can grow quite big.

Hope this helps

Thank you very much for that @Stokkes i think they will come in very useful.

Would you mind sharing you have your folders set up. That, I think is one of my main issues, I am trying to work with a remote that already has a fair amount of media on (2.5TB) and a downloading setup that I have been comfortable with for over 18 months, trying to work this solution in has just confused me.

Removing any and all doubt about my expertise with Linux (I have improved…honest) what would i do with the scripts you have kindly linked here, Where do i save them.

Sorry. I am pretty new to actually working with the command line, until recently it was execute a script and keep everything crossed, i now find i want a greater level of control, hence the newby questions.