Bash script to connect to two drives

I'm trying to configure a bash script which will connect two drives using rclone upon startup, currently I have one drive successfully connecting but when I try to get two working - only one does.

rclone v1.59.1

  • os/version: ubuntu 20.04 (64 bit)
  • os/kernel: 5.17.5-76051705-generic (x86_64)
  • os/type: linux
  • os/arch: amd64
  • go/version: go1.18.5
  • go/linking: static
  • go/tags: none

I am trying to connect two separate Uptobox accounts.

# Variables
CACHEDIR="/home/path/cache"
RCLONEOPTIONS="--daemon --allow-other -v --transfers 16 --vfs-cache-mode full --cache-dir=${CACHEDIR}"
RCLONEDRIVE1="uptobox:"
LOCALMOUNTPOINT1="path"
RCLONEDRIVE2="up2box:"
LOCALMOUNTPOINT2="path"

# Check if first drive is mounted or not
MOUNTSTATUS1=$(df -h | grep "${LOCALMOUNTPOINT1}")

if [ -z "${MOUNTSTATUS1}" ]
then
	# If not, mount locally
	rclone mount ${RCLONEOPTIONS} ${RCLONEDRIVE1}/ ${LOCALMOUNTPOINT1}/
fi

# Check if second drive is mounted or not
MOUNTSTATUS2=$(df -h | grep "${LOCALMOUNTPOINT2}")

if [ -z "${MOUNTSTATUS2}" ]
then
	# If not, mount locally
	rclone mount ${RCLONEOPTIONS} ${RCLONEDRIVE2}/ ${LOCALMOUNTPOINT2}/
fi
#

hello,

use a rclone debug log and look into it for errors.

Would you be able to tell me the command to pull the debug log please? I have looked at the resources and I find it quite confusing, it might seem lazy of me, but I struggle with taking in a lot of information like the resources pages due to illness and medication.

I'm not sure the issue is rclone but the actual script itself, I know this is out of the support scoop but I was hoping someone more knowledable might be able to help.

need to add this to your rclone command, just change the log file path as needed.
--log-level=DEBUG --log-file=/home/user/logfile.txt
one logfile per command, do not use use one log file for two rclone commands

1 Like

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