Multiple Url In Text File & Wanted To Use "rclone copyurl" For Parallel Uploads To Remote

What is the problem you are having with rclone?

I use rclone copyurl as below for single file upload to my remote connection. But wanted to know how to use rclone copyurl command to do with multiple url placed in text file. And upload them as parallel to remote.

rclone copyurl 'https://cdn1.jv-cdn.workers.dev/0:/Downloads/The%20Bourne%20Supremacy%20%282004%29%20%20%5B2160p%20x265%2010bit%20FS96%20Joy%5D.mkv' onedrive: -a --progress

Run the command 'rclone version' and share the full output of the command.

ubuntu@ubuntu:~$ rclone version
rclone v1.57.0

  • os/version: ubuntu 20.04 (64 bit)
  • os/kernel: 5.11.0-1028-oracle (aarch64)
  • os/type: linux
  • os/arch: arm64
  • go/version: go1.17.2
  • go/linking: static
  • go/tags: none

Which cloud storage system are you using? (eg Google Drive)

Onedrive business

The command you were trying to run (eg rclone copy /tmp remote:tmp)

rclone copyurl 'https://cdn1.jv-cdn.workers.dev/0:/Downloads/The%20Bourne%20Supremacy%20%282004%29%20%20%5B2160p%20x265%2010bit%20FS96%20Joy%5D.mkv' onedrive: -a --progress

The rclone config contents with secrets removed.

ubuntu@ubuntu:~$ rclone config show
[onedrive]
type = onedrive
client_id = 
client_secret = 
token = 
drive_id = 
drive_type = business

A log from the command with the -vv flag

ubuntu@ubuntu:~$ rclone copyurl 'https://cdn1.jv-cdn.workers.dev/0:/Downloads/The%20Bourne%20Supremacy%20%282004%29%20%20%5B2160p%20x265%2010bit%20FS96%20Joy%5D.mkv' onedrive: -a --progress -vv
2022/02/03 12:27:44 DEBUG : rclone: Version "v1.57.0" starting with parameters ["rclone" "copyurl" "https://cdn1.jv-cdn.workers.dev/0:/Downloads/The%20Bourne%20Supremacy%20%282004%29%20%20%5B2160p%20x265%2010bit%20FS96%20Joy%5D.mkv" "onedrive:" "-a" "--progress" "-vv"]
2022/02/03 12:27:44 DEBUG : Creating backend with remote "onedrive:"
2022/02/03 12:27:44 DEBUG : Using config file from "/home/ubuntu/.config/rclone/rclone.conf"
2022-02-03 12:27:46 DEBUG : The Bourne Supremacy (2004)  [2160p x265 10bit FS96 Joy].mkv: File name found in url
2022-02-03 12:27:46 DEBUG : The Bourne Supremacy (2004)  [2160p x265 10bit FS96 Joy].mkv: Starting multipart upload
2022-02-03 12:27:47 DEBUG : The Bourne Supremacy (2004)  [2160p x265 10bit FS96 Joy].mkv: Uploading segment 0/5800656297 size 10485760
2022-02-03 12:27:51 DEBUG : The Bourne Supremacy (2004)  [2160p x265 10bit FS96 Joy].mkv: Uploading segment 10485760/5800656297 size 10485760
2022-02-03 12:27:54 DEBUG : The Bourne Supremacy (2004)  [2160p x265 10bit FS96 Joy].mkv: Uploading segment 20971520/5800656297 size 10485760
2022-02-03 12:27:56 DEBUG : The Bourne Supremacy (2004)  [2160p x265 10bit FS96 Joy].mkv: Uploading segment 31457280/5800656297 size 10485760
2022-02-03 12:28:00 DEBUG : The Bourne Supremacy (2004)  [2160p x265 10bit FS96 Joy].mkv: Uploading segment 41943040/5800656297 size 10485760
Transferred:       45.956 MiB / 5.402 GiB, 1%, 3.142 MiB/s, ETA 29m5s
Transferred:            0 / 1, 0%
Elapsed time:        16.7s
Transferring:
 * The Bourne Supremacy (…65 10bit FS96 Joy].mkv:  0% /5.402Gi, 3.142Mi/s, 29m5s


If you can set up the remote as an http backend then you can do parallel copying with rclone copy. This requires plain directory listings which your site may not have though.

Probably the best solution is just to run multiple copies of rclone copyurl since the files are big and take some time.

Ohhh.

Currently I am completing require tasks running multiple ssh session at the same time in TERMIUS software.

Let assume if I have 5 url to be uploaded to remote. Then I will open 5 ssh session. And paste every url link in opned sequence ssh session.

hi,
use a simple .sh script, and run that one single task.
on linux, there are many ways to run a task in the background, so if you close the ssh session, the task continue to run.

The issue what I face is don't have sound knowledge on linux & scripting.

  1. create a text file, let's call it doit.sh, copy/paste the commands, for example
rclone copyurl 'https://cdn1.jv-cdn.workers.dev/0:/Downloads/The%20Bourne%20Supremacy%20%282004%29%20%20%5B2160p%20x265%2010bit%20FS96%20Joy%5D.mkv' onedrive: -a --progress
rclone copyurl 'https://cdn1.jv-cdn.workers.dev/0:/Downloads/The%20Bourne%20Supremacy%20%282004%29%20%20%5B2160p%20x265%2010bit%20FS96%20Joy%5D.mkv' onedrive: -a --progress
rclone copyurl 'https://cdn1.jv-cdn.workers.dev/0:/Downloads/The%20Bourne%20Supremacy%20%282004%29%20%20%5B2160p%20x265%2010bit%20FS96%20Joy%5D.mkv' onedrive: -a --progress
  1. chmod +x doit.sh
  2. ./doit.sh

What I have done till now is created new notepad file on windows & pasted below rclone copyurl commands. And saved file as uploader.sh which transferred to linux server.

Step 2 & 3 I have write in terminal or they should too go inside text file..?

rclone copyurl 'https://pepper.devilz.workers.dev/0:/www.TamilBlasters.re%20-%20The%20Family%20Man%20(2021)%20S02%20(E01-09)%20%5BHindi%20-%201080p%20HD%20AVC%20-%20x264%20-%20UNTOUCHED%20-%20DDP5.1%20(640kbps)%20-%201.8.2GB%20-%20ESubs%5D/EP-01%20-%20www.TamilBlasters.re.mkv' onedrive: -a --progress
rclone copyurl 'https://pepper.devilz.workers.dev/0:/www.TamilBlasters.re%20-%20The%20Family%20Man%20(2021)%20S02%20(E01-09)%20%5BHindi%20-%201080p%20HD%20AVC%20-%20x264%20-%20UNTOUCHED%20-%20DDP5.1%20(640kbps)%20-%201.8.2GB%20-%20ESubs%5D/EP-02%20-%20www.TamilBlasters.re.mkv' onedrive: -a --progress
rclone copyurl 'https://pepper.devilz.workers.dev/0:/www.TamilBlasters.re%20-%20The%20Family%20Man%20(2021)%20S02%20(E01-09)%20%5BHindi%20-%201080p%20HD%20AVC%20-%20x264%20-%20UNTOUCHED%20-%20DDP5.1%20(640kbps)%20-%201.8.2GB%20-%20ESubs%5D/EP-03%20-%20www.TamilBlasters.re.mkv' onedrive: -a --progress
rclone copyurl 'https://pepper.devilz.workers.dev/0:/www.TamilBlasters.re%20-%20The%20Family%20Man%20(2021)%20S02%20(E01-09)%20%5BHindi%20-%201080p%20HD%20AVC%20-%20x264%20-%20UNTOUCHED%20-%20DDP5.1%20(640kbps)%20-%201.8.2GB%20-%20ESubs%5D/EP-04%20-%20www.TamilBlasters.re.mkv' onedrive: -a --progress
rclone copyurl 'https://pepper.devilz.workers.dev/0:/www.TamilBlasters.re%20-%20The%20Family%20Man%20(2021)%20S02%20(E01-09)%20%5BHindi%20-%201080p%20HD%20AVC%20-%20x264%20-%20UNTOUCHED%20-%20DDP5.1%20(640kbps)%20-%201.8.2GB%20-%20ESubs%5D/EP-05%20-%20www.TamilBlasters.re.mkv' onedrive: -a --progress
rclone copyurl 'https://pepper.devilz.workers.dev/0:/www.TamilBlasters.re%20-%20The%20Family%20Man%20(2021)%20S02%20(E01-09)%20%5BHindi%20-%201080p%20HD%20AVC%20-%20x264%20-%20UNTOUCHED%20-%20DDP5.1%20(640kbps)%20-%201.8.2GB%20-%20ESubs%5D/EP-06%20-%20www.TamilBlasters.re.mkv' onedrive: -a --progress
rclone copyurl 'https://pepper.devilz.workers.dev/0:/www.TamilBlasters.re%20-%20The%20Family%20Man%20(2021)%20S02%20(E01-09)%20%5BHindi%20-%201080p%20HD%20AVC%20-%20x264%20-%20UNTOUCHED%20-%20DDP5.1%20(640kbps)%20-%201.8.2GB%20-%20ESubs%5D/EP-07%20-%20www.TamilBlasters.re.mkv' onedrive: -a --progress
rclone copyurl 'https://pepper.devilz.workers.dev/0:/www.TamilBlasters.re%20-%20The%20Family%20Man%20(2021)%20S02%20(E01-09)%20%5BHindi%20-%201080p%20HD%20AVC%20-%20x264%20-%20UNTOUCHED%20-%20DDP5.1%20(640kbps)%20-%201.8.2GB%20-%20ESubs%5D/EP-08%20-%20www.TamilBlasters.re.mkv' onedrive: -a --progress
rclone copyurl 'https://pepper.devilz.workers.dev/0:/www.TamilBlasters.re%20-%20The%20Family%20Man%20(2021)%20S02%20(E01-09)%20%5BHindi%20-%201080p%20HD%20AVC%20-%20x264%20-%20UNTOUCHED%20-%20DDP5.1%20(640kbps)%20-%201.8.2GB%20-%20ESubs%5D/EP-09%20-%20www.TamilBlasters.re.mkv' onedrive: -a --progress


step 2+3, do that in terminal.

I have placed totally 9 url in text file named as uploader.sh. Then ran below commands in terminal. Got this error. Only 1 file which is last one out total 9 file got to onedrive.

chmod +x uploader.sh
./uploader.sh



ubuntu@ubuntu:~$ chmod +x uploader.sh
ubuntu@ubuntu:~$ ./uploader.sh
Error: unknown flag: --progress
Usage:
  rclone copyurl https://example.com dest:path [flags]

Flags:
  -a, --auto-filename    Get the file name from the URL and use it for destination file path
  -h, --help             help for copyurl
      --no-clobber       Prevent overwriting file with same name
  -p, --print-filename   Print the resulting name from --auto-filename
      --stdout           Write the output to stdout rather than a file

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.

2022/02/03 18:44:47 Fatal error: unknown flag: --progress
Error: unknown flag: --progress
Usage:
  rclone copyurl https://example.com dest:path [flags]

Flags:
  -a, --auto-filename    Get the file name from the URL and use it for destination file path
  -h, --help             help for copyurl
      --no-clobber       Prevent overwriting file with same name
  -p, --print-filename   Print the resulting name from --auto-filename
      --stdout           Write the output to stdout rather than a file

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.

2022/02/03 18:44:47 Fatal error: unknown flag: --progress
Error: unknown flag: --progress
Usage:
  rclone copyurl https://example.com dest:path [flags]

Flags:
  -a, --auto-filename    Get the file name from the URL and use it for destination file path
  -h, --help             help for copyurl
      --no-clobber       Prevent overwriting file with same name
  -p, --print-filename   Print the resulting name from --auto-filename
      --stdout           Write the output to stdout rather than a file

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.

2022/02/03 18:44:47 Fatal error: unknown flag: --progress
Error: unknown flag: --progress
Usage:
  rclone copyurl https://example.com dest:path [flags]

Flags:
  -a, --auto-filename    Get the file name from the URL and use it for destination file path
  -h, --help             help for copyurl
      --no-clobber       Prevent overwriting file with same name
  -p, --print-filename   Print the resulting name from --auto-filename
      --stdout           Write the output to stdout rather than a file

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.

2022/02/03 18:44:47 Fatal error: unknown flag: --progress
Error: unknown flag: --progress
Usage:
  rclone copyurl https://example.com dest:path [flags]

Flags:
  -a, --auto-filename    Get the file name from the URL and use it for destination file path
  -h, --help             help for copyurl
      --no-clobber       Prevent overwriting file with same name
  -p, --print-filename   Print the resulting name from --auto-filename
      --stdout           Write the output to stdout rather than a file

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.

2022/02/03 18:44:47 Fatal error: unknown flag: --progress
Error: unknown flag: --progress
Usage:
  rclone copyurl https://example.com dest:path [flags]

Flags:
  -a, --auto-filename    Get the file name from the URL and use it for destination file path
  -h, --help             help for copyurl
      --no-clobber       Prevent overwriting file with same name
  -p, --print-filename   Print the resulting name from --auto-filename
      --stdout           Write the output to stdout rather than a file

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.

2022/02/03 18:44:47 Fatal error: unknown flag: --progress
Error: unknown flag: --progress
Usage:
  rclone copyurl https://example.com dest:path [flags]

Flags:
  -a, --auto-filename    Get the file name from the URL and use it for destination file path
  -h, --help             help for copyurl
      --no-clobber       Prevent overwriting file with same name
  -p, --print-filename   Print the resulting name from --auto-filename
      --stdout           Write the output to stdout rather than a file

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.

2022/02/03 18:44:47 Fatal error: unknown flag: --progress
Error: unknown flag: --progress
Usage:
  rclone copyurl https://example.com dest:path [flags]

Flags:
  -a, --auto-filename    Get the file name from the URL and use it for destination file path
  -h, --help             help for copyurl
      --no-clobber       Prevent overwriting file with same name
  -p, --print-filename   Print the resulting name from --auto-filename
      --stdout           Write the output to stdout rather than a file

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.

2022/02/03 18:44:47 Fatal error: unknown flag: --progress
Transferred:        2.859 GiB / 2.859 GiB, 100%, 2.356 MiB/s, ETA 0s
Transferred:            1 / 1, 100%
Elapsed time:     13m24.9s

test using a single command and add -vv to the command.

Okay now testing for single url in text file with -vv flag.

and might work better to create/edit the .sh file inside linux, not on windows.
windows and linux use different EOL - end of line, characters.

only recent versions of notepad, handle EOL conversions automatically.

For scripting and getting readable output, I'd avoid --progress as that's meant to be more interactive.

I just use:

 --stats-one-line -v

That gives much better logging output imo.

Tried with 1st url with -vv flag. And it was working. Got this output.


ubuntu@ubuntu:~$ chmod +x uploader.sh
ubuntu@ubuntu:~$ ./uploader.sh
2022/02/03 19:14:33 DEBUG : rclone: Version "v1.57.0" starting with parameters ["rclone" "copyurl" "https://pepper.devilz.workers.dev/0:/www.TamilBlasters.re%20-%20The%20Family%20Man%20(2021)%20S02%20(E01-09)%20%5BHindi%20-%201080p%20HD%20AVC%20-%20x264%20-%20UNTOUCHED%20-%20DDP5.1%20(640kbps)%20-%201.8.2GB%20-%20ESubs%5D/EP-01%20-%20www.TamilBlasters.re.mkv" "onedrive:" "-a" "--progress" "-vv"]
2022/02/03 19:14:33 DEBUG : Creating backend with remote "onedrive:"
2022/02/03 19:14:33 DEBUG : Using config file from "/home/ubuntu/.config/rclone/rclone.conf"
2022/02/03 19:14:33 DEBUG : onedrive: Loaded invalid token from config file - ignoring
2022/02/03 19:14:33 DEBUG : Saving config "token" in section "onedrive" of the config file
2022/02/03 19:14:33 DEBUG : Keeping previous permissions for config file: -rwxrwxrwx
2022/02/03 19:14:33 DEBUG : onedrive: Saved new token in config file
2022-02-03 19:14:36 DEBUG : EP-01 - www.TamilBlasters.re.mkv: File name found in url
2022-02-03 19:14:36 DEBUG : EP-01 - www.TamilBlasters.re.mkv: Starting multipart upload
2022-02-03 19:14:36 DEBUG : EP-01 - www.TamilBlasters.re.mkv: Uploading segment 0/3088197285 size 10485760
2022-02-03 19:14:41 DEBUG : EP-01 - www.TamilBlasters.re.mkv: Uploading segment 10485760/3088197285 size 10485760
2022-02-03 19:14:44 DEBUG : EP-01 - www.TamilBlasters.re.mkv: Uploading segment 20971520/3088197285 size 10485760
2022-02-03 19:14:47 DEBUG : EP-01 - www.TamilBlasters.re.mkv: Uploading segment 31457280/3088197285 size 10485760
2022-02-03 19:14:50 DEBUG : EP-01 - www.TamilBlasters.re.mkv: Uploading segment 41943040/3088197285 size 10485760
2022-02-03 19:14:53 DEBUG : EP-01 - www.TamilBlasters.re.mkv: Uploading segment 52428800/3088197285 size 10485760
2022-02-03 19:14:56 DEBUG : EP-01 - www.TamilBlasters.re.mkv: Uploading segment 62914560/3088197285 size 10485760
2022-02-03 19:15:00 DEBUG : EP-01 - www.TamilBlasters.re.mkv: Uploading segment 73400320/3088197285 size 10485760
2022-02-03 19:15:01 INFO  : Signal received: interrupt
2022-02-03 19:15:01 DEBUG : EP-01 - www.TamilBlasters.re.mkv: Cancelling multipart upload: <nil>
Transferred:       76.573 MiB / 2.876 GiB, 3%, 3.017 MiB/s, ETA 15m50s
Transferred:            0 / 1, 0%
Elapsed time:        27.8s
Transferring:
 *              EP-01 - www.TamilBlasters.re.mkv:  2% /2.876Gi, 3.017Mi/s, 15m50s

Have created new file on linux machine using "nano uploader.sh"

And pasted all 9 url into file. The saved it by pressing CTRL - X then Y then ENTER.

Tried below commands :-


chmod +x uploader.sh
./uploader.sh

It started for 1st url.

I am assuming this process is not parallel it will upload one by one each url.

ok, now that is working, let's implement @Animosity022 suggestion.
test using two lines.

rclone copyurl -a --stats-one-line -v 'https://pepper.devilz.workers.dev/0:/www.TamilBlasters.re%20-%20The%20Family%20Man%20(2021)%20S02%20(E01-09)%20%5BHindi%20-%201080p%20HD%20AVC%20-%20x264%20-%20UNTOUCHED%20-%20DDP5.1%20(640kbps)%20-%201.8.2GB%20-%20ESubs%5D/EP-01%20-%20www.TamilBlasters.re.mkv' onedrive:  
rclone copyurl -a --stats-one-line -v 'https://pepper.devilz.workers.dev/0:/www.TamilBlasters.re%20-%20The%20Family%20Man%20(2021)%20S02%20(E01-09)%20%5BHindi%20-%201080p%20HD%20AVC%20-%20x264%20-%20UNTOUCHED%20-%20DDP5.1%20(640kbps)%20-%201.8.2GB%20-%20ESubs%5D/EP-01%20-%20www.TamilBlasters.re.mkv' onedrive:  

@asdffdsa Okay. As now I have updated my .sh file on linux machine for only 2 files. And followed @Animosity022 suggestion.

It shows status update for past 1 minute. As @Animosity022 suggested --progress is real time updates.


ubuntu@ubuntu:~$ chmod +x uploader.sh
ubuntu@ubuntu:~$ ./uploader.sh
2022/02/03 19:31:28 INFO  :       224 MiB / 2.876 GiB, 8%, 4.696 MiB/s, ETA 9m39s
2022/02/03 19:32:28 INFO  :   504.323 MiB / 2.876 GiB, 17%, 4.294 MiB/s, ETA 9m28s
2022/02/03 19:33:28 INFO  :       770 MiB / 2.876 GiB, 26%, 4.319 MiB/s, ETA 8m23s


Depending on what you want to, you can dump it all into a log file as well and get the adds/removes/deletes.

Add in something like:

--log-file /home/ubuntu/upload.log

and you'll get a file that is appended to that you can go back to and check.

So my logfile looks like:

2022/02/03 14:09:00 INFO  :     6.199 GiB / 6.199 GiB, 100%, 28.051 MiB/s, ETA -
2022/02/03 14:09:02 INFO  : Somefile.mkv: Copied (new)
2022/02/03 14:09:02 INFO  : Somefile.mkv: Deleted
2022/02/03 14:09:02 INFO  : Blah: Removing directory
2022/02/03 14:09:02 INFO  :     6.199 GiB / 6.199 GiB, 100%, 26.297 MiB/s, ETA 0s
2022/02/03 14:09:02 INFO  : Dropbox root 'SecureT/smu5ej34ujbdoip1cm3mlk92q4': Commiting uploads - please wait...

only need to do that one time.

I am assuming remote uploads in this methods are not parallel. I mean all 9 url starts getting remote uploading at same time.

Currently it is going one by one url. Just thinking is it possible..?