Error: unknown flag: --drive-stop-on-upload-limit

What is the problem you are having with rclone?

Unable to run upload script with --drive-stop-on-upload-limit. It works fine if I remove this tag.

What is your rclone version (output from rclone version)

rclone v1.49.2

  • os/arch: linux/amd64
  • go version: go1.12.9

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

Linux, it is a seedbox unsure of the version and distro it could be Ubuntu or debian

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

///

#!/bin/bash
set -e

RClone Config file

RCLONE_CONFIG=/opt/rclone/rclone.conf; export RCLONE_CONFIG
RCLONE_USER_AGENT=sheldon; export RCLONE_USER_AGENT

Local Drive - This must be a local mount point on your server that is used for the source of files

WARNING: If you make this your rclone Google Drive mount, it will create a move loop

and DELETE YOUR FILES!

Make sure to set this to the local path you are moving from!!

LOCAL=/home/sheldon/local

Exit if running

if [[ $(pidof -x "$(basename "$0")" -o %PPID) ]]; then
echo "Already running, exiting..."; exit 1; fi

Check for excludes file

if [[ ! -f /home/sheldon/scripts/excludes ]]; then
echo "excludes file not found, aborting..."; exit 1; fi

Is $LOCAL actually a local disk?

if /bin/findmnt $LOCAL -o FSTYPE -n | grep fuse; then
echo "FUSE file system found, exiting..."; exit 1; fi

Move older local files to the cloud...

I added in 3 days to let the files sit a few days so Plex intro anaylsis can happen locally

/usr/bin/rclone move $LOCAL gdrive: --log-file /home/sheldon/scripts/rclone-upload.log -v --exclude-from /home/sheldon/scripts/excludes --delete-empty-src-dirs --fast-list --drive-stop-on-upload-limit --min-age 1m

///

The rclone config contents with secrets removed.

Paste config here

///

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

///

A log from the command with the -vv flag

Paste  log here

///

sheldon@hera:~/scripts$ ./rclone-upload.sh --verbose --stats 1s
Error: unknown flag: --drive-stop-on-upload-limit
Usage:
rclone move source:path dest:path [flags]

Flags:
--create-empty-src-dirs Create empty source dirs on destination after move
--delete-empty-src-dirs Delete empty source dirs after move
-h, --help help for move

Use "rclone [command] --help" for more information about a command.
Use "rclone help flags" for to see the global flags.
Use "rclone help backends" for a list of supported services.

2021/08/15 21:49:47 Fatal error: unknown flag: --drive-stop-on-upload-limit

///

hello and welcome to the forum,

that version of rclone is many years old, so please update to latest stable, v1.56.0 and test again
https://rclone.org/downloads/#script-download-and-install

1 Like

I updated my version

sheldon@hera:~/scripts$ rclone --version
rclone v1.56.0

  • os/version: debian 10.10 (64 bit)
  • os/kernel: 4.19.0-17-amd64 (x86_64)
  • os/type: linux
  • os/arch: amd64
  • go/version: go1.16.5
  • go/linking: static
  • go/tags: none

but i still get the same error

If you got the same error, you are pointing to the old version.

Run the full command and add -vv and share the full output of the command you are running that produces the error.

not sure what you mean, I did update rclone and the above reply says it is on the latest version

I used your script on github as an example so I used ./ to run it.

If I remove --drive-stop-on-upload-limit the script runs.

sheldon@hera:~/scripts$ ./rclone-upload.sh --vv
Error: unknown flag: --drive-stop-on-upload-limit
Usage:
rclone move source:path dest:path [flags]

Flags:
--create-empty-src-dirs Create empty source dirs on destination after move
--delete-empty-src-dirs Delete empty source dirs after move
-h, --help help for move

Use "rclone [command] --help" for more information about a command.
Use "rclone help flags" for to see the global flags.
Use "rclone help backends" for a list of supported services.

2021/08/16 16:19:01 Fatal error: unknown flag: --drive-stop-on-upload-limit
sheldon@hera:~/scripts$

My script

////

#!/bin/bash

RCLONE UPLOAD CRON TAB SCRIPT

chmod a+x /pathtoscript/scripts/rclone-upload.sh

Type crontab -e and add line below (without #) and with correct path to the script

* * * * * /pathtoscript/scripts/rclone-upload.sh >/dev/null 2>&1

set -e

RClone Config file

RCLONE_CONFIG=/home/sheldon/.config/rclone/rclone.conf; export RCLONE_CONFIG
RCLONE_USER_AGENT=sheldon; export RCLONE_USER_AGENT

Local Drive - This must be a local mount point on your server that is used for the source of files

WARNING: If you make this your rclone Google Drive mount, it will create a move loop

and DELETE YOUR FILES!

Make sure to set this to the local path you are moving from!!

LOCAL=/home/sheldon/local
HOME=/home/sheldon
REMOTE="gdrive"

Bandwidth limits: specify the desired bandwidth in kBytes/s, or use a suffix b|k|M|G. Or 'off' or '0' for unlimited. The script uses --drive-stop-on-upload-limit which stops the script if the 750GB/day limit is achieved.

BWLimit1Time="00:00"
BWLimit1="0"
BWLimit2Time="19:00"
BWLimit2="0"

Exit if running

if [[ $(pidof -x "$(basename "$0")" -o %PPID) ]]; then
echo "Already running, exiting..."; exit 1; fi

Check for excludes file

if [[ ! -f $HOME/scripts/excludes ]]; then
echo "excludes file not found, aborting..."; exit 1; fi

Is $LOCAL actually a local disk?

if /bin/findmnt $LOCAL -o FSTYPE -n | grep fuse; then
echo "FUSE file system found, exiting..."; exit 1; fi

Move older local files to the cloud...

/usr/bin/rclone move $LOCAL $REMOTE:
--log-file $HOME/scripts/rclone-upload.log
-v
--exclude-from $HOME/scripts/excludes
--drive-stop-on-upload-limit
--delete-empty-src-dirs
--fast-list
--min-age 1m
--max-transfer 740G
--bwlimit "${BWLimit1Time},${BWLimit1} ${BWLimit2Time},${BWLimit2}"

////

how do I see what version I am pointing to because the Ultra.cc support gave me the command to update rclone and I don't have sufficient rights to do anything further as it is a seedbox

You'd have to work with the vendor with that to validate.

If you don't have the option, you have the wrong version. It's really just that simple but I don't know how to validate on your provider.

hi,

i would search your file system for all instances of the rclone executable.and run which rclone
and run rclone version on each rclone found.

thanks i will do that.

Right, your script isn't pointing to that location.

You need to adjust your script to point to wherever you have it installed.

I changed the location, I didn't know the command to find it so Thank You.

I wasn't sure where it installed the new version

The script is now working properly

yeah, i had that problem once with another program.

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