What is the problem you are having with rclone?
As per documentation ( https://rclone.org/docs/#list-of-exit-codes ) exite codes are:
0
- success
9
- Operation successful, but no files transferred
Using copy command i had '0' instead of '9'
What is your rclone version (output from rclone version
)
rclone v1.53.3
os/arch: windows/amd64
go version: go1.15.5
Which OS you are using and how many bits (eg Windows 7, 64 bit)
windows 10 pro 64 bit
Which cloud storage system are you using? (eg Google Drive)
SFTP
The command you were trying to run (eg rclone copy /tmp remote:tmp
)
rclone copy --progress --exclude /xxxxx/ Source:/home/user/path Locale:c:\local\dir
This is what i see (from --progress) and in destination folder i don't have files because on sftp server there are no files:
Transferred: 0 / 0 Bytes, -, 0 Bytes/s, ETA -
Elapsed time: 0.6s
Exit code returned is 0 not 9
I'm processing in a batch file and i need to do action only if files are downloaded.
Thanks in advance and excuse my english.
1 Like
Can you please include a full debug log of the issue?
asdffdsa
(jojothehumanmonkey)
December 18, 2020, 3:38pm
3
before trying to copy, make sure that rclone can see the files in the remote.
test with rclone ls Source:/home/user/path -vv
and post the output
Sorry but i'm at home now, i'll post the log next monday.
@asdffdsa rclone can read and copy, already tested that; if i don't use --exclude i can see and copy subfolders.
asdffdsa
(jojothehumanmonkey)
December 18, 2020, 3:58pm
5
ok. but you wrote on sftp server there are no files:
so the actual problem is using --exclude
?
need to see the exact command with a debug log
The problem is that on the server there are no files, only one subfolder (--exclude) and rclone exit code is 0 insteadof 9.
I'm testing cases that will occour in our work:
copy files (successful) and after launch another script (exit code 0)
no files to copy for any error and send an alert (exit code 1 - 8)
no files to copy because there are no files and do nothing (exit code 9)
I will send log next working day
asdffdsa
(jojothehumanmonkey)
December 18, 2020, 5:01pm
7
1 Like
Thanks, i didn't see that flag.
So i have to treat this as an error .
Problem solved (I hope, monday i'll try)
ncw
(Nick Craig-Wood)
December 19, 2020, 7:18pm
9
Yes, normally copying no files isn't a problem.
asdffdsa
(jojothehumanmonkey)
December 19, 2020, 7:21pm
10
hi, do you think that the docs need a tweak?
to append this
NB: Requires https://rclone.org/docs/#error-on-no-transfer
@ncw yes and in mi case isn't a problem, but if i copy files i have to do things on them.
@asdffdsa i think it will be better with that tweak, i found the correct error code (9) for my needs but not that i had to use the flag "--error-on-no-transfer", because no files to copy isn't a error
Thanks to all.
ncw
(Nick Craig-Wood)
December 20, 2020, 4:16pm
12
That sounds like a good idea - want to send a fix?
asdffdsa
(jojothehumanmonkey)
December 20, 2020, 4:45pm
13
wanted to check with you first.
yes, i will do that.
Thanks to all, problem solved.
asdffdsa
(jojothehumanmonkey)
December 30, 2020, 4:46pm
15
please remind me
do i just raise the issue
or
do a pull request, with the change itself and the post that into a new issue?
ncw
(Nick Craig-Wood)
December 31, 2020, 9:32am
16
For a small docs tweak, just send the PR, no issue needed.
asdffdsa
(jojothehumanmonkey)
January 5, 2021, 2:23pm
18
hello and welcome to the forum,
glad that helped you.
and thanks to you, to remind me, that i need to submit a PR about this!
1 Like
system
(system)
Closed
March 7, 2021, 10:23am
19
This topic was automatically closed 60 days after the last reply. New replies are no longer allowed.