what specifically is preventing you from doing that?
i have done that in the past, and i can think of two ways...
what specifically is preventing you from doing that?
i have done that in the past, and i can think of two ways...
Unfortunately, this didn't work.
2024/09/24 10:00:21 DEBUG : rclone: Version "v1.68.0" starting with parameters ["C:\\rclone\\rclone.exe" "bisync" "box:NAS/Upload" "\\\\10.1.1.10\\upload" "--create-empty-src-dirs" "--recover" "--resilient" "--log-file" "C:\\logfile.txt" "--log-level" "debug" "--retries" "3" "--fs-cache-expire-duration" "0"]
2024/09/24 10:00:21 DEBUG : Creating backend with remote "box:JDE/Upload"
2024/09/24 10:00:21 DEBUG : Using config file from "C:\\Users\\username\\AppData\\Roaming\\rclone\\rclone.conf"
2024/09/24 10:00:22 DEBUG : box root 'NAS/Upload': Token expired but no uploads in progress - doing nothing
2024/09/24 10:00:22 DEBUG : box: Loaded invalid token from config file - ignoring
2024/09/24 10:00:24 DEBUG : box: got fatal oauth error: oauth2: "invalid_grant" "Refresh token has expired"
2024/09/24 10:00:25 DEBUG : Config file has changed externally - reloading
2024/09/24 10:00:25 DEBUG : box: Loaded fresh token from config file
2024/09/24 10:00:25 DEBUG : box: Loaded new refresh token from config file
2024/09/24 10:00:26 CRITICAL: Failed to create file system for "box:NAS/Upload": is a directory not a file
How would you do this?
net use v: \\server\path /user:username password /persistent:no
rclone lsd v:/
net use v: /delete
net use \\server\path /user:username password /persistent:no
subst v: \\server\path
rclone lsd v:/
net use \\server\path /delete
subst /d v:
Neither of these work in Task Scheduler running a batch file with these contents.
subst V: \\Path\Path >C:\Log\Logfile.txt
and
net use V: \\Path\Path /user:Domain\Username password /persistent:no >C:\Log\Logfile.txt
doesn't even make the output log file but run from a bat file in Task Scheduler. The task just sits running.
i created a new task, a network share with a file.
i ran the task as system user, which is never a good idea.
i ran the task as non-system user.
in both cases, the script ran as expected.
echo task start > log.txt
whoami >> log.txt
echo 1 >> log.txt
net use \\100.122.213.46\zork /user:vserver03\zork redacted /persistent:no >> log.txt
net use >> log.txt
echo 2 >> log.txt
subst x: \\100.122.213.46\zork
subst >> log.txt
echo 3 >> log.txt
rclone ls x:/ --log-level=DEBUG --log-file=rclone.txt > x.txt
echo task completed >> log.txt
log.txt
task start
nt authority\system
1
The command completed successfully.
New connections will not be remembered.
Status Local Remote Network
-------------------------------------------------------------------------------
OK \\100.122.213.46\zork Microsoft Windows Network
The command completed successfully.
2
X:\: => UNC\100.122.213.46\zork
3
task completed
rclone.txt
2024/09/24 12:52:36 DEBUG : rclone: Version "v1.67.0" starting with parameters ["c:\\data\\rclone\\rclone.exe" "ls" "x:/" "--log-level=DEBUG" "--log-file=rclone.txt"]
2024/09/24 12:52:36 DEBUG : Creating backend with remote "x:/"
2024/09/24 12:52:36 DEBUG : Using config file from "c:\\data\\rclone\\rclone.conf"
2024/09/24 12:52:36 DEBUG : fs cache: renaming cache item "x:/" to be canonical "//?/x:/"
2024/09/24 12:52:36 DEBUG : 2 go routines active
x.txt
0 file.ext
Ah, okay, I figured out what I was doing wrong. Let me give that a shot and see where we get.
Alas
subst Z: \\10.1.1.10\Upload
2024/09/24 15:50:01 DEBUG : rclone: Version "v1.68.0" starting with parameters ["rclone" "bisync" "box:NAS/Upload" "Z:" "--create-empty-src-dirs" "--recover" "--resilient" "--log-file" "C:\\scripts\\UploadLog\\Uploadlog.txt" "--log-level" "debug" "--retries" "3" "--fs-cache-expire-duration" "0"]
2024/09/24 15:50:01 DEBUG : Creating backend with remote "box:NAS/Upload"
2024/09/24 15:50:01 DEBUG : Using config file from "C:\\Users\\username\\AppData\\Roaming\\rclone\\rclone.conf"
2024/09/24 15:50:01 DEBUG : box root 'NAS/Upload': Token expired but no uploads in progress - doing nothing
2024/09/24 15:50:01 DEBUG : box: Loaded invalid token from config file - ignoring
2024/09/24 15:50:02 DEBUG : box: got fatal oauth error: oauth2: "invalid_grant" "Refresh token has expired"
2024/09/24 15:50:02 DEBUG : Config file has changed externally - reloading
2024/09/24 15:50:02 DEBUG : box: Loaded fresh token from config file
2024/09/24 15:50:02 DEBUG : box: Loaded new refresh token from config file
2024/09/24 15:50:02 CRITICAL: Failed to create file system for "box:NAS/Upload": is a directory not a file
second log, second time with the same error.
maybe, post a debug log that does not have that message?
Okay, so that got me thinking.
I have three tasks running rclone bisync
for three different directories, with simultaneous start times. The same issue is happening in all three directories, although not simultaneously. The below thread, though, got me thinking that having all three start simultaneously may mean that the access token is being used by one of the three tasks and not getting refreshed in time for the other tasks.
I've tried staggering my scheduled tasks now. Maybe that'll solve the issue?
Good find! That would also explain this:
2024/09/24 15:50:02 DEBUG : Config file has changed externally - reloading
Let us know
In other news, I think I just found how to fix the item_name_in_use
bug
Alright, we've gone a very long time with no errors, so I think that did it! Thanks everyone for the help.
Awesome! Congrats
This topic was automatically closed 3 days after the last reply. New replies are no longer allowed.