I Need to use volume name/label (rather than volume letter) in rclone config.
The reason is that I backup routinely from a USB flash drive and whenever it's connected to the computer, while the volume name/label remains the same, the volume letter oftentimes changes.
Example that currently works (but problematic because I need to update the volume letter in the config every time before backup):
[remote_01]
type = alias
remote = F:\sync
Example of what I need to achieve:
[remote_01]
type = alias
remote = LABEL_01:\sync
Run the command 'rclone version' and share the full output of the command.
rclone v1.66.0
- os/version: Microsoft Windows 10 Pro 22H2 (64 bit)
- os/kernel: 10.0.19045.4170 (x86_64)
- os/type: windows
- os/arch: amd64
- go/version: go1.22.1
- go/linking: static
- go/tags: cmount
Which cloud storage system are you using? (eg Google Drive)
Google Drive
The command you were trying to run (eg rclone copy /tmp remote:tmp)
rclone sync remote_01: remote_02:
Please run 'rclone config redacted' and share the full output. If you get command not found, please make sure to update rclone.
[remote_01]
type = alias
remote = F:\sync
[remote_02]
type = alias
remote = C:\test
A log from the command that you were trying to run with the -vv flag
2024/09/28 12:26:22 DEBUG : rclone: Version "v1.66.0" starting with parameters ["rclone" "sync" "remote_01:" "remote_02:" "-vv"]
2024/09/28 12:26:22 DEBUG : Creating backend with remote "remote_01:"
2024/09/28 12:26:22 DEBUG : Using config file from "C:\\Users\\zac\\AppData\\Roaming\\rclone\\rclone.conf"
2024/09/28 12:26:22 DEBUG : Creating backend with remote "LABEL_01:/sync"
2024/09/28 12:26:22 Failed to create file system for "remote_01:": didn't find section in config file
Using the same prefix \\?\ it is also possible to specify path to volumes identified by their GUID, e.g. \\?\Volume{b75e2c83-0000-0000-0000-602f00000000}\some\path .
Thanks, that works and it's definitely a partial solution.
Now the issue is that the GUID is not persistent between different machines (the USB flash drive gets different GUIDs in different machines).
My usage of rclone is mainly from within VMs (which are essentially different machines) so now it still requires to update the config whenever moving to new VM.
I wonder if there's still some way to achieve it with volume name/label?
maybe.
as i have shown, just a single line of powershell is needed to find the drive letter based on label.
no need to create remote, no need to update config file, no need to modify the script file.