Jump to content

[Plugin] rclone


Waseh

Recommended Posts

  • 2 months later...
On 8/24/2023 at 6:33 AM, Howboys said:

I don't have diagnostics because the server was hung (couldn't do anything), but any idea why this might be happening?

 

Would retrying downloading rclone help with transient network glitches?

PXL_20230824_132822695.jpg

Can confirm this issue is also happening to me. stuck on trying to download the zip file i believe.. 

 

removing the plugin from my flash drive solves this issue and allows me to get into the unraid GUI

 

Oddly enough.. if i reboot and get into the GUI and then try to re-install the rclone plugin, it will install perfectly fine.. but won't let me access the settings -> rclone page. it just hangs. and locks my GUI up. so i have to reboot the system. 

 

Not sure whats causing this. i was on 6.12.0 and thought it was a version issue so updated to 6.12.4, but still the same problems. 

 

I've also tried slightly older backups i've had but still no dice. 

 

Not sure whats causing this issue.. with the restore AND the clean install..

Link to comment
  • 2 months later...

Hey.

I have read a lot about how to install rclone on unraid but I am stuck at authenticating rclone.

I am running unraid headless (like most of us?) and if I choose "yes" to use a webbrowser on the machine it does not work of course, because there is none.

And if I choose "no" it gives me a link I cannot use, because this link only works on the same machine !?

 

Do I really have to plug a monitor on my server and start it in gui mode to authenticate rclone?

Link to comment

@sylvio2000yep, I had the same problem. I‘m an absolute Unraid newbie and Windows User. Had this problem for a while. My Solution:

Download the programm rclone under Windows, its just an exe-file no Installation needed. Start the rclone configuration under Windows (using cmd with admin rights, start „rclone config“ in the terminal).
 

Everyrhing works fine, I was able to get the Login Screen for my OneDrive and was able to save the config file.

 

After that i copied the config file from my Windows PC to my Unraid Server in the appdata folder for rclone.

 

Now it works. I‘m struggeling with the scripts and mounting points. But that is another story…

Edited by TermyD
Link to comment
  • 3 months later...

I thought I'd share this here. I wrote a pretty easy to use mount script for rclone that will both mount a remote and start any dockers.

It's also designed to be run on an interval such as every hour to ensure that the mount is still active and that the dockers are still running.

 

Here it is if anyone finds it helpful:

 

#!/bin/bash

# Define the mount directory
MOUNT_DIR="/mnt/remotes/mount"

# Define rclone remote name
RCLONE_REMOTE="remote_name_here"

# Define rclone cache directory location
RCLONE_CACHE_DIR="/mnt/cache/appdata/rclonecache"

# Define Docker containers as an array. Containers should be in quotes seperated by spaces.
DOCKER_CONTAINERS=("docker1" "docker2" "docker3")

# Check if the mount directory exists, create it if not
if [ ! -d "$MOUNT_DIR" ]; then
  echo "Mount directory does not exist, creating it..."
  mkdir -p "$MOUNT_DIR"
fi

# Check if rclone is already mounted at MOUNT_DIR
if mount | grep -q "$MOUNT_DIR"; then
  echo "rclone is already mounted at $MOUNT_DIR."
else
  # Mounting the drive
  echo "mounting rclone at $MOUNT_DIR."
rclone mount \
    --allow-other \
    --allow-non-empty \
    --log-level INFO \
    --poll-interval 1s \
    --dir-cache-time 1m \
    --cache-dir="$RCLONE_CACHE_DIR" \
    --vfs-cache-mode full \
    --vfs-cache-max-size 100G \
    --vfs-cache-max-age 24h \
    --vfs-read-chunk-size 128M \
    --vfs-read-chunk-size-limit 1G \
    --vfs-read-ahead 128M \
    --uid 99 \
    --gid 100 \
    --umask 002 \
    $RCLONE_REMOTE: "$MOUNT_DIR" &
fi

# Ensuring the mount operation has enough time to initialize before starting the docker containers
sleep 10

# Loop through the Docker containers array
for container in "${DOCKER_CONTAINERS[@]}"; do
  # Check if the Docker container is already running
  if docker ps | grep -q $container; then
      echo "Docker container '$container' is already running."
  else
      echo "Starting Docker container '$container'..."
      docker start $container
  fi
done

 

Unmount script (to be run at array stop):

#!/bin/bash

# Define the mount directory
MOUNT_DIR="/mnt/remotes/mount"

# Unmount the mount point
fusermount -uz "${MOUNT_DIR}"

 

  • Like 2
Link to comment
  • 2 weeks later...

This Rclone plugin stopped working for me. I've found that I can install the NerdPack plugin in Unraid and use the rclone package it installs. This way I don't need to use the full docker etc, and NerdTools allows me to update rclone versions if I want to.

 

In my use case, I need to periodically back up a remote FTP folder to my Unraid array.

  1. To do so, I install the NerdTools plugin for Unraid, ensure the Rclone library is installed through it.
  2. Then, set up web GUI for Rclone so you can use it to make config files.
    Run following command from Unraid:
    rclone rcd --rc-web-gui --rc-user=test --rc-pass=test --rc-addr http://[your unraid local ip]:11903
  3. Then point browser to the URL the command's output gives you, or to http:[your unraid local ip]:11903
  4. The rclone config should be for an FTP, on port 21, with the given username and password, and select "no" for both the implicit and explicit ftp options (or configure as you wish)
  5. Then use the User Scripts plugin to set up a script to run the following:
#!/bin/bash

echo "<div style=' width: 40%; -webkit-border-radius: 8px 8px 0 0; border-radius: 8px 8px 0 0; border: solid 1px #cccccc; background-color: #ffe88a; padding-left: 10px;'><br><b><font color='black' size='2'>Copyingremote FTP to local Unraid shared folder</font><b><br>  </div>"
#echo "======================="

#echo "Backing-up from:" 
#echo "  <b><font color='blue'>[insert your FTP description here]"</b></font>"
#echo "to:"
#echo "  <b><font color='blue'>"Local [insert unraid shared folder name here] folder</b></font>"

echo "<div style='width: 40%; -webkit-border-radius:  0 0 8px 8px; border-radius: 0 0 8px 8px; background-color: #ebebeb; margin-top: -14px; padding-left: 10px; padding-top: 6px;border: solid 1px #cccccc; '>Backing-up from: <br><b><font color='blue' size='2'>"[insert your FTP description here]"</b></font> <br>to:<br><b><font color='blue' size='2'>"[insert unraid shared folder name here]"</b></font><br> </div>"

rclone copy "[the name you gave the profile in rclone]:/" "/mnt/user/[the unraid share folder to back up to]"

echo ""
echo "<div style='padding-left: 10px; margin-top: -14px; '><font color='green' size='4'><b>Done!</b></font></div>"

-----------------------------------

Set the desired cron options for that user script so it runs in the background when you want it to.

 

Done.

Good luck.

Link to comment

@adoucette - Still working for me. However I'm not even sure what you mean by " I don't need to use the full docker". This plugin has no docker container involved at all? And can also update the rclone version.
Are you sure this is the correct thread for the plugin/docker container you're talking about?

Link to comment
8 minutes ago, Waseh said:

Are you sure this is the correct thread for the plugin/docker container you're talking about?

Yes, thanks, am sure.

 

Also pretty sure my post was clear about this, but if clarification is still wanting:

The rclone plugin for unraid (which this thread pertains to) stopped working for me and I was not able to remove and reinstall it successfully, or to get it to work again. Per previous recent posts it seems I have not been alone in experiencing this. Prior to that, the plugin also did not let me update versions (though it did show an update was available). Too bad! It worked well for me for a long time. So thanks for all work put into it.

 

Tried the BinHex's rclone docker, but realized i could get by with using the rclone package NerdTools provided.

I have provided above an example of what worked for me using NerdTools' rclone CLI, the rclone GUI it can provide, and User Scripts in case that is helpful to anyone else.

 

Thanks again Waseh. Really appreciated your plugin and it worked great for me for a number of years until just a few months ago.

Link to comment

@adoucette Without anymore debugging info it's hard to say why it's not working for you.
Just tested updating (and changing branches from stable to beta and back to stable) on my end and that still works as well (on the newest version of unraid).
This just to say that the plugin is still working. Your post indicates that it does not, and while that may be the case for you, it is not the true in general :) 

Link to comment
  • 1 month later...

I am investigating methods to be able to backup my Google Drive to Unraid and there are a few references to this plugin to do that but the only how-to I have found is a very old SpaceInvaderOne video that is completely outdated according to the viewers comments. Can anyone here provide some up-to-date details for the process?

Link to comment
39 minutes ago, wgstarks said:

I am investigating methods to be able to backup my Google Drive to Unraid and there are a few references to this plugin to do that but the only how-to I have found is a very old SpaceInvaderOne video that is completely outdated according to the viewers comments. Can anyone here provide some up-to-date details for the process?

Rclone is a good tool for that purpose.

I used Nerd Tools, and within that enabled it's version of rclone. You can see my post above with recent instructions for how I was able to make rclone work.

 

Link to comment
  • 3 weeks later...

I can't get it to work, i get the following log, it doesn't seem to be an connection issue as I can ping services. But the logging it not exact enough to see what goes wrong.  Any help?
 

plugin: installing: rclone.plg
Executing hook script: pre_plugin_checks
plugin: downloading: rclone.plg ... done

Executing hook script: pre_plugin_checks

+==============================================================================
| Installing new package /boot/config/plugins/rclone/install/rclone-2024.05.27-bundle.txz
+==============================================================================

Verifying package rclone-2024.05.27-bundle.txz.
Installing package rclone-2024.05.27-bundle.txz:
PACKAGE DESCRIPTION:
Package rclone-2024.05.27-bundle.txz installed.
Downloading and installing rclone
Install failed - No binary found
plugin: run failed: '/bin/bash' returned 1
Executing hook script: post_plugin_checks

 

Link to comment

@Mikeve97 That's odd. Could you try running

curl --connect-timeout 15 --retry 3 --retry-delay 2 --retry-max-time 30 -o /boot/config/plugins/rclone/install/rclone.zip --create-dirs https://downloads.rclone.org/rclone-current-linux-amd64.zip

And see what the output is? Most likely either the download or the unzip is failing somehow.

Link to comment

The output of that is:

 

curl --connect-timeout 15 --retry 3 --retry-delay 2 --retry-max-time 30 -o /boot/config/plugins/rclone/install/rclone.zip --create-dirs https://downloads.rclone.org/rclone-current-linux-amd64.zip
  % Total    % Received % Xferd  Average Speed   Time    Time     Time  Current
                                 Dload  Upload   Total   Spent    Left  Speed
100 20.3M  100 20.3M    0     0  36.7M      0 --:--:-- --:--:-- --:--:-- 36.7M

 

Looking in the rclone directory I can see the files:

 

root@Tower:/boot/config/plugins/rclone/install# ls
rclone-2024.05.27-bundle.txz  rclone.zip

 

so most likely the unzipping is failing, any idea?

Edited by Mikeve97
Link to comment

First step would be to try and unzip it and getting the binary into the correct path:
 

    unzip -o -j "/boot/config/plugins/rclone/install/rclone.zip" "*/rclone" -d "/boot/config/plugins/rclone/install"
    cp /boot/config/plugins/rclone/install/rclone /usr/sbin/rcloneorig
    chown root:root /usr/sbin/rcloneorig
    chmod 755 /usr/sbin/rcloneorig


Try running these sequentially and see if any of them fails.

Link to comment
  • 1 month later...

It might be a dumb question, but it seems that the webUI version does not work for me.

I've just installed the Rclone via Apps (plugin, Installed Version2024.08.22) with WebUI option

Quote

2024.08.22
Add rclone WebUI (optional) - by ich777

 

Using CLI i configured it to backup a folder from my unraid, to a google disk. When I try to open a GUI it looks like working, but no option actually works.

"Configs" shows nothing:

 

Hitting "create new config" makes it crash. Choosing "explorer" too. 

Should I install some additional modules to make it work?

2 config.png

1 dashboard.png

log.txt

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.

×
×
  • Create New...