What is the problem you are having with rclone?
I have a network shared drive mapped to a windows PC. I'm using RClone copy to back up all of the directories at the root of that share and their contents to Box. My RClone command is included in a batch file. When I execute the batch file from the command line, it runs as expected; however, when the batch file is executed via Scheduled Task, it fails (3 times) with "error reading source directory: directory not found". Batch file below.
What is your rclone version (output from rclone version
)
v1.56.1
Which cloud storage system are you using? (eg Google Drive)
Box
The command you were trying to run (eg rclone copy /tmp remote:tmp
)
Batch file contents:
DEL C:\Users\usernm\Documents\Scripts\log.txt
rclone copy Z:\ -P -vv --log-file C:\Users\usernm\Documents\Scripts\log.txt boxconfig:/ExO/LabBackups/usr-nas/usrlab
The rclone config contents with secrets removed.
[boxconfig]
type = box
box_sub_type = user
token = {"access_token":"accessremoved","token_type":"bearer","refresh_token":"refreshremoved","expiry":"2021-09-30T10:21:46.600906-07:00"}
A log from the command with the -vv
flag
2021/09/29 23:00:06 DEBUG : rclone: Version "v1.56.1" starting with parameters ["rclone" "copy" "Z:\\" "-P" "-vv" "--log-file" "C:\\Users\\usernm\\Documents\\Scripts\\log.txt" "boxconfig:/ExO/LabBackups/usr-nas/usrlab"]
2021/09/29 23:00:06 DEBUG : Creating backend with remote "Z:\\"
2021/09/29 23:00:06 DEBUG : Using config file from "C:\\Users\\usernm\\.config\\rclone\\rclone.conf"
2021/09/29 23:00:06 DEBUG : fs cache: renaming cache item "Z:\\" to be canonical "//?/Z:/"
2021/09/29 23:00:06 DEBUG : Creating backend with remote "boxconfig:/ExO/LabBackups/usr-nas/usrlab"
2021/09/29 23:00:06 DEBUG : box root 'ExO/LabBackups/usr-nas/usrlab': Token expired but no uploads in progress - doing nothing
2021/09/29 23:00:06 DEBUG : boxconfig: Loaded invalid token from config file - ignoring
2021/09/29 23:00:07 DEBUG : Saving config "token" in section "boxconfig" of the config file
2021/09/29 23:00:07 DEBUG : Keeping previous permissions for config file: -rw-rw-rw-
2021/09/29 23:00:07 DEBUG : boxconfig: Saved new token in config file
2021/09/29 23:00:10 DEBUG : fs cache: renaming cache item "boxconfig:/ExO/LabBackups/usr-nas/usrlab" to be canonical "boxconfig:ExO/LabBackups/usr-nas/usrlab"
2021/09/29 23:00:11 ERROR : Local file system at //?/Z:/: error reading source root directory: directory not found
2021/09/29 23:00:11 DEBUG : box root 'ExO/LabBackups/usr-nas/usrlab': Waiting for checks to finish
2021/09/29 23:00:11 DEBUG : box root 'ExO/LabBackups/usr-nas/usrlab': Waiting for transfers to finish
2021/09/29 23:00:11 ERROR : Attempt 1/3 failed with 1 errors and: directory not found
2021/09/29 23:00:12 ERROR : Local file system at //?/Z:/: error reading source root directory: directory not found
2021/09/29 23:00:12 DEBUG : box root 'ExO/LabBackups/usr-nas/usrlab': Waiting for checks to finish
2021/09/29 23:00:12 DEBUG : box root 'ExO/LabBackups/usr-nas/usrlab': Waiting for transfers to finish
2021/09/29 23:00:12 ERROR : Attempt 2/3 failed with 1 errors and: directory not found
2021/09/29 23:00:13 ERROR : Local file system at //?/Z:/: error reading source root directory: directory not found
2021/09/29 23:00:13 DEBUG : box root 'ExO/LabBackups/usr-nas/usrlab': Waiting for checks to finish
2021/09/29 23:00:13 DEBUG : box root 'ExO/LabBackups/usr-nas/usrlab': Waiting for transfers to finish
2021/09/29 23:00:13 ERROR : Attempt 3/3 failed with 1 errors and: directory not found
2021/09/29 23:00:13 INFO :
Transferred: 0 / 0 Byte, -, 0 Byte/s, ETA -
Errors: 1 (retrying may help)
Elapsed time: 7.0s
2021/09/29 23:00:13 DEBUG : 7 go routines active
2021/09/29 23:00:13 Failed to copy: directory not found
Can anyone suggest why the batch file will run without error from the command line but fail as a scheduled task?