What is the problem you are having with rclone?
Running rclone from a Powershell script with admin rights it dosn't copies any file from source directory, but if I run it from Shell it works.
It's important that the source directory is a mounted Shadow Copy (VSS) on my computer. This way I can backup some files that are currently used on my computer, like Outlook's file (.PST and .OST).
If I run rclone's command in my Powershell script executed as Administrator, the copy fails. But if I run rclone's command directly into Powershell console it works, always as Admininistrator.
I found on some forums that Windows blocks some file types to be Shadow Copy, as Outlook.OST files, but I have already fixed that.
Run the command 'rclone version' and share the full output of the command.
rclone v1.59.2
- os/version: Microsoft Windows 11 Pro 22H2 (64 bit)
- os/kernel: 10.0.22621.1105 (x86_64)
- os/type: windows
- os/arch: amd64
- go/version: go1.18.6
- go/linking: static
- go/tags: cmount
Which cloud storage system are you using? (eg Google Drive)
Local storage on PC.
The command you were trying to run (eg rclone copy /tmp remote:tmp
)
C:\Temp\rclone.exe sync C:\_ShadowCopy\Users\parasect\AppData\Local\Microsoft\Outlook\ C:\Temp\RSYNC_ADMiN\ --log-file=C:\temp\rclone_log.txt
The rclone config contents with secrets removed.
Default Config, no changes made
A log from the command with the -vv
flag
2023/01/16 15:22:33 DEBUG : rclone: Version "v1.59.2" starting with parameters ["C:\\Temp\\rclone.exe" "sync" "C:\\_ShadowCopy\\Users\\parasect\\AppData\\Local\\Microsoft\\Outlook\\" "C:\\Temp\\RSYNC_ADMiN\\" "--log-file=C:\\temp\\rclone_log_console.txt" "-vv"]
2023/01/16 15:22:33 DEBUG : Creating backend with remote "C:\\_ShadowCopy\\Users\\parasect\\AppData\\Local\\Microsoft\\Outlook\\"
2023/01/16 15:22:33 NOTICE: Config file "C:\\Users\\parasect\\AppData\\Roaming\\rclone\\rclone.conf" not found - using defaults
2023/01/16 15:22:33 DEBUG : fs cache: renaming cache item "C:\\_ShadowCopy\\Users\\parasect\\AppData\\Local\\Microsoft\\Outlook\\" to be canonical "//?/C:/_ShadowCopy/Users/parasect/AppData/Local/Microsoft/Outlook/"
2023/01/16 15:22:33 DEBUG : Creating backend with remote "C:\\Temp\\RSYNC_ADMiN\\"
2023/01/16 15:22:33 DEBUG : fs cache: renaming cache item "C:\\Temp\\RSYNC_ADMiN\\" to be canonical "//?/C:/Temp/RSYNC_ADMiN/"
...
2023/01/16 15:22:33 DEBUG : parasect@outlook.ost: Reopening on read failure after 0 bytes: retry 7/10: read \\?\C:\_ShadowCopy\Users\parasect\AppData\Local\Microsoft\Outlook\parasect@outlook.ost: The process cannot access the file because another process has locked a portion of the file.
2023/01/16 15:22:33 DEBUG : parasect@outlook.ost: Reopening on read failure after 0 bytes: retry 8/10: read \\?\C:\_ShadowCopy\Users\parasect\AppData\Local\Microsoft\Outlook\parasect@outlook.ost: The process cannot access the file because another process has locked a portion of the file.
2023/01/16 15:22:33 ERROR : backup.pst: Failed to copy: read \\?\C:\_ShadowCopy\Users\parasect\AppData\Local\Microsoft\Outlook\backup.pst: The process cannot access the file because another process has locked a portion of the file.
2023/01/16 15:22:33 DEBUG : parasect@outlook.ost: Reopening on read failure after 0 bytes: retry 9/10: read \\?\C:\_ShadowCopy\Users\parasect\AppData\Local\Microsoft\Outlook\parasect@outlook.ost: The process cannot access the file because another process has locked a portion of the file.
2023/01/16 15:22:33 DEBUG : parasect@outlook.ost: Reopening on read failure after 0 bytes: retry 10/10: read \\?\C:\_ShadowCopy\Users\parasect\AppData\Local\Microsoft\Outlook\parasect@outlook.ost: The process cannot access the file because another process has locked a portion of the file.
2023/01/16 15:22:33 DEBUG : parasect@outlook.ost: Reopen failed after 0 bytes read: failed to reopen: too many retries
2023/01/16 15:22:33 NOTICE: parasect@outlook.ost: Removing partially written file on error: read \\?\C:\_ShadowCopy\Users\parasect\AppData\Local\Microsoft\Outlook\parasect@outlook.ost: The process cannot access the file because another process has locked a portion of the file.
2023/01/16 15:22:33 ERROR : parasect@outlook.ost: Failed to copy: read \\?\C:\_ShadowCopy\Users\parasect\AppData\Local\Microsoft\Outlook\parasect@outlook.ost: The process cannot access the file because another process has locked a portion of the file.
2023/01/16 15:22:33 ERROR : Local file system at //?/C:/Temp/RSYNC_ADMiN/: not deleting files as there were IO errors
2023/01/16 15:22:33 ERROR : Local file system at //?/C:/Temp/RSYNC_ADMiN/: not deleting directories as there were IO errors
2023/01/16 15:22:33 ERROR : Attempt 3/3 failed with 2 errors and: read \\?\C:\_ShadowCopy\Users\parasect\AppData\Local\Microsoft\Outlook\parasect@outlook.ost: The process cannot access the file because another process has locked a portion of the file.
2023/01/16 15:22:33 INFO :
Transferred: 0 B / 0 B, -, 0 B/s, ETA -
Errors: 2 (retrying may help)
Checks: 80 / 80, 100%
Elapsed time: 0.1s
2023/01/16 15:22:33 DEBUG : 5 go routines active
2023/01/16 15:22:33 Failed to sync with 2 errors: last error was: read \\?\C:\_ShadowCopy\Users\parasect\AppData\Local\Microsoft\Outlook\parasect@outlook.ost: The process cannot access the file because another process has locked a portion of the file.