Howdy, Stranger!

It looks like you're new here. If you want to get involved, click one of these buttons!


Plex / Rclone - Any good scripts or How To Guides out there?
New on LowEndTalk? Please Register and read our Community Rules.

All new Registrations are manually reviewed and approved, so a short delay after registration may occur before your account becomes active.

Plex / Rclone - Any good scripts or How To Guides out there?

jeromezajeromeza Member
edited April 2020 in General

I'm looking at setting up Plex again.

I've got the typical Sonarr / Radarr and other bits covered - I'm just not sure about rclone and the newer bits like that - assuming I want to offload older content to Google Drive.

Specifically rclone, crypt, cache and those things are all new to me.

Any good guides I should look at?

Comments

  • I use quickbox.io and it sets up plex and rclone for me in one click lol

  • @dedipromo said:
    I use quickbox.io and it sets up plex and rclone for me in one click lol

    Pro version?

  • AlefAlef Member

    Here is one of the few guides I could find, haven't read it over but it looks pretty detailed.
    https://www.andyibanez.com/posts/rclone-basics-encryption/

    As for scripts I run the one below from cron once a day. Keep in mind you'll need to change the paths to your requirements.

    #!/bin/bash
    #Checks if process already running
    if pidof -o %PPID -x "$0"; then
       exit 1
    fi
    
    LOGFILE="/var/log/rclone.log"
    FROM="/backup/"
    TO="GoogleDriveCrypt:dedi1-montreal"
    
    /usr/bin/rclone copy "$FROM" "$TO" --transfers=20 --checkers=20 --log-file=$LOGFILE --config=/root/.config/rclone/rclone.conf --bwlimit 25M --tpslimit 5
    

    This script copies everything in my /backup/ folder and places it in a folder on my google drive. If you want to offload old things you can add --min-age Duration ex --min-age 30d flag to the rclone copy command. That will only copy things to your drive older then x days.

    There is tons of configuration options, so I suggest you checkout the docs at https://rclone.org/ if you can't find a tutorial meeting your requirements.

  • BarisBaris Member
    edited April 2020

    Hi,
    I am using this settings: https://forum.rclone.org/t/my-recommended-google-drive-and-plex-mount-settings/6132

    It works very stable for me.

    First you need your own client id: https://rclone.org/drive/#making-your-own-client-id

    After that you type "rclone config" to setup a new GDrive: https://rclone.org/drive/

    When you are asked for the client id and client secret use the info which you generated over the Google console.

    When you are asked "Use auto config?" you choose N for No. You will get a link, open this in your browser and login to your GDrive. Your rclone is connected to GDrive now.

    Second step is to crypt your GDrive: https://rclone.org/crypt/

    During this process you have to enter you GDrive remote name (previous step) and a path: name_of_your_gdrive_remote:your_path

    If you forgot your GDrive remote name type "rclone config file" and it will show you the path to your rclone config file with the remote name for your GDrive (you chose it yourself during the GDrive setup).

    Your path can be anything. It will be like a newly created folder in your root directory of GDrive.

    When asked, choose to decrypt folder and file name.

    You can either generate password + salt or specify it yourself.

    Now you are done with the rclone setup.

    Next step is to mount your GDrive: https://rclone.org/commands/rclone_mount/

    I recommend to use this flags: https://github.com/animosity22/homescripts/blob/master/systemd/rclone.service.

    I got errors with "--poll-interval 15s". I used "--poll-interval 0m15s" instead.

    Also the buffer size was to high for my low spec KVM causing unstable behavior after a certain time, so instead of 256mb I used "--buffer-size 32M".

    You can check out the mount manually and then enable the rclone.service for systemd.

    Enable https://github.com/animosity22/homescripts/blob/master/systemd/GD-find.service for systemd to warm up the cache.

    I don't use mergerfs. My approach is simple. I have a folder for movies (radarr) and a folder for tv shows (sonarr).

    I let radarr + sonarr download my stuff to these folders and backup them manually to GDrive when ever I feel to do so.

    On GDrive I also have a movie and TV shows folder.

    In plex I have four folders:

    • Movies (movie folder on VPS)
    • TV shows (tv show folder on VPS)
    • GDrive Movies (movies folder on GDrive)
    • GDrive TV shows (TV shows folder on GDrive)

    This approach is simple (no mergerfs) but the downside is that you have to remove the movies on radarr + sonarr before you transfer them to GDrive.

    I might check out mergerfs in the future.

    Tweak your plex to not generate thumbnails previews and so on, otherwise you will hit the API limit very soon. You have a 750GB daily traffic limit on GDrive.

    Check out the rclone documentation if you want to know how you can transfer files to GDrive:

    rclone copy - Copy files from source to dest, skipping already copied.
    https://rclone.org/commands/rclone_copy/

    rclone sync - Make source and dest identical, modifying destination only.
    https://rclone.org/commands/rclone_sync/

    rclone move - Move files from source to dest.
    https://rclone.org/commands/rclone_move/

    Personally I use the rclone move command to transfer files to GDrive. Use the --dry-run flag to simulate the transfer if you are uncertain to prevent data loss.

    I use rclone sync to sync two different GDrives with each other. There is also a server side sync option with 100GB daily traffic quota.

    You can automate the backup with cron.

    Thanked by 1bdl
  • @mtsbatalha said:

    @dedipromo said:
    I use quickbox.io and it sets up plex and rclone for me in one click lol

    Pro version?

    Yes it's the pro version.

  • Just use plexguide. It;s all in one. Super easy to use.

  • Thank you all - lots of reading for me to do!

    I really appreciate it!

  • pikepike Veteran

    Im using plexdrive (which is a tuned rclone mount for plex) with my Emby instance.

  • Cloudbox

  • jbilohjbiloh Administrator, Veteran

    Plex really is a fantastic piece of software.

    We have a guide we are publishing in the next month for using Plex on a Low End Box.

Sign In or Register to comment.