What is the problem you are having with rclone?
Hi im tying to create a setup and backup script for my windows client.
My problem is that i want to make it so that i can use it also on machines with different usernames.
i tried to change inside the config file a part of the path with %username% what is a cmd environment variable for the loggedin username.
i dont really understand the environmental config descriptions and even dont know if i could even use them at a windows machine or only on linux.
when i start my .bat file with the command below in it then its connect with the error of the -vv log and just show a empty folder
What is your rclone version (output from rclone version
)
rclone v1.54.1
- os/arch: windows/amd64
- go version: go1.15.8
and also
rclone v1.55.1 - os/type: windows
- os/arch: amd64
- go/version: go1.16.3
- go/linking: dynamic
- go/tags: cmount
Which OS you are using and how many bits (eg Windows 7, 64 bit)
Windows 10 newest version and windows 11 dev inside build
Which cloud storage system are you using? (eg Google Drive)
Onedrive over windows client (when i dont use the variable and write the path completely, its working)
The command you were trying to run (eg rclone copy /tmp remote:tmp
)
rclone mount --config backup.conf obcrypt: Z: --cache-db-purge --buffer-size 32M --timeout 1h --dir-cache-time 5s --vfs-cache-mode writes
The rclone config contents with secrets removed.
[obcrypt]
type = crypt
remote = C:\Users\%username%\OneDrive\Backup\
filename_encryption = standard
directory_name_encryption = true
password = XXX
password2 = XXX
A log from the command with the -vv
flag
2021/07/05 01:31:19 DEBUG : Creating backend with remote "obcrypt:"
2021/07/05 01:31:19 DEBUG : Creating backend with remote "C:\\Users\\%username%\\OneDrive\\Backup\\"
2021/07/05 01:31:19 DEBUG : fs cache: renaming cache item "C:\\Users\\%username%\\OneDrive\\Backup\\" to be canonical "//?/C:/Users/%username%/OneDrive/Backup/"
2021/07/05 01:31:19 INFO : Encrypted drive 'obcrypt:': poll-interval is not supported by this remote
2021/07/05 01:31:19 DEBUG : vfs cache: root is "\\\\?\\C:\\Users\\Patrick\\AppData\\Local\\rclone\\vfs\\obcrypt"
2021/07/05 01:31:19 DEBUG : vfs cache: metadata root is "\\\\?\\C:\\Users\\Patrick\\AppData\\Local\\rclone\\vfs\\obcrypt"
2021/07/05 01:31:19 DEBUG : Creating backend with remote "\\\\?\\C:\\Users\\Patrick\\AppData\\Local\\rclone\\vfs\\obcrypt"
2021/07/05 01:31:19 DEBUG : fs cache: renaming cache item "\\\\?\\C:\\Users\\Patrick\\AppData\\Local\\rclone\\vfs\\obcrypt" to be canonical "//?/C:/Users/Patrick/AppData/Local/rclone/vfs/obcrypt"
2021/07/05 01:31:19 DEBUG : fs cache: switching user supplied name "\\\\?\\C:\\Users\\Patrick\\AppData\\Local\\rclone\\vfs\\obcrypt" for canonical name "//?/C:/Users/Patrick/AppData/Local/rclone/vfs/obcrypt"
2021/07/05 01:31:19 DEBUG : Network mode mounting is disabled
2021/07/05 01:31:19 DEBUG : Mounting on "Z:" ("obcrypt")
2021/07/05 01:31:19 INFO : vfs cache: cleaned: objects 0 (was 0) in use 0, to upload 0, uploading 0, total size 0 (was 0)
2021/07/05 01:31:19 DEBUG : Encrypted drive 'obcrypt:': Mounting with options: ["-o" "attr_timeout=1" "-o" "uid=-1" "-o" "gid=-1" "--FileSystemName=rclone" "-o" "volname=obcrypt"]
2021/07/05 01:31:19 DEBUG : Encrypted drive 'obcrypt:': Init:
2021/07/05 01:31:19 DEBUG : Encrypted drive 'obcrypt:': >Init:
2021/07/05 01:31:19 DEBUG : /: Statfs:
2021/07/05 01:31:19 ERROR : Encrypted drive 'obcrypt:': Statfs failed: failed to read disk usage: Das System kann den angegebenen Pfad nicht finden.
2021/07/05 01:31:19 DEBUG : /: >Statfs: stat={Bsize:4096 Frsize:4096 Blocks:8796093022207 Bfree:8796093022207 Bavail:8796093022207 Files:1000000000 Ffree:1000000000 Favail:0 Fsid:0 Flag:0 Namemax:255}, errc=0
2021/07/05 01:31:19 DEBUG : /: Getattr: fh=0xFFFFFFFFFFFFFFFF
2021/07/05 01:31:19 DEBUG : /: >Getattr: errc=0
2021/07/05 01:31:19 DEBUG : /: Readlink:
2021/07/05 01:31:19 DEBUG : /: >Readlink: linkPath="", errc=-40
2021/07/05 01:31:19 DEBUG : /: Statfs:
2021/07/05 01:31:19 DEBUG : /: >Statfs: stat={Bsize:4096 Frsize:4096 Blocks:274877906944 Bfree:274877906944 Bavail:274877906944 Files:1000000000 Ffree:1000000000 Favail:0 Fsid:0 Flag:0 Namemax:255}, errc=0
2021/07/05 01:31:19 DEBUG : /: Getattr: fh=0xFFFFFFFFFFFFFFFF
2021/07/05 01:31:19 DEBUG : /: >Getattr: errc=0
The service rclone has been started.
2021/07/05 01:31:19 DEBUG : /: Getattr: fh=0xFFFFFFFFFFFFFFFF
2021/07/05 01:31:19 DEBUG : /: >Getattr: errc=0
2021/07/05 01:31:19 DEBUG : /: Opendir:
2021/07/05 01:31:19 DEBUG : /: OpenFile: flags=O_RDONLY, perm=-rwxrwxrwx
2021/07/05 01:31:19 DEBUG : /: >OpenFile: fd=/ (r), err=<nil>
2021/07/05 01:31:19 DEBUG : /: >Opendir: errc=0, fh=0x0
2021/07/05 01:31:19 DEBUG : /: Releasedir: fh=0x0
2021/07/05 01:31:19 DEBUG : /: >Releasedir: errc=0
2021/07/05 01:31:19 DEBUG : /: Getattr: fh=0xFFFFFFFFFFFFFFFF
2021/07/05 01:31:19 DEBUG : /: >Getattr: errc=0
2021/07/05 01:31:19 DEBUG : /: Getattr: fh=0xFFFFFFFFFFFFFFFF
2021/07/05 01:31:19 DEBUG : /: >Getattr: errc=0
2021/07/05 01:31:20 DEBUG : /: Opendir:
2021/07/05 01:31:20 DEBUG : /: OpenFile: flags=O_RDONLY, perm=-rwxrwxrwx
2021/07/05 01:31:20 DEBUG : /: >OpenFile: fd=/ (r), err=<nil>
2021/07/05 01:31:20 DEBUG : /: >Opendir: errc=0, fh=0x0
2021/07/05 01:31:20 DEBUG : /: Releasedir: fh=0x0
2021/07/05 01:31:20 DEBUG : /: Getattr: fh=0xFFFFFFFFFFFFFFFF
2021/07/05 01:31:20 DEBUG : /: >Getattr: errc=0
2021/07/05 01:31:20 DEBUG : /: >Releasedir: errc=0
2021/07/05 01:31:20 DEBUG : /: Getattr: fh=0xFFFFFFFFFFFFFFFF
2021/07/05 01:31:20 DEBUG : /: >Getattr: errc=0
2021/07/05 01:31:20 DEBUG : /: Opendir:
2021/07/05 01:31:20 DEBUG : /: OpenFile: flags=O_RDONLY, perm=-rwxrwxrwx
2021/07/05 01:31:20 DEBUG : /: >OpenFile: fd=/ (r), err=<nil>
2021/07/05 01:31:20 DEBUG : /: >Opendir: errc=0, fh=0x0
2021/07/05 01:31:20 DEBUG : /: Releasedir: fh=0x0
2021/07/05 01:31:20 DEBUG : /: >Releasedir: errc=0
Hope someone can help me
Greetings