What is the problem you are having with rclone?
- rclone is deleting text from config file.
- rclone is misformatting remotes from config file.
same behavior on windows and linux
same behavior v1.56.2 + v1.57.0
steps to reproduce
- create a config file with this text
[01]
type = alias
remote = 01
#01
[02]
type = alias
remote = 02
#02
- using
rclone config
, create a new remote and the updated config file will look like
[01]
type = alias
remote = 01
#01
[02]
type = alias
remote = 02
[03]
type = alias
remote = 03
- notice that:
---#01
has moved from bottom of[01]
to top of[02]
---#02
from[02]
has been deleted
What is your rclone version (output from rclone version
)
rclone v1.56.2
- os/version: ubuntu 20.04 (64 bit)
- os/kernel: 5.10.60.1-microsoft-standard-WSL2 (x86_64)
- os/type: linux
- os/arch: amd64
- go/version: go1.16.8
- go/linking: static
- go/tags: none
rclone v1.57.0
- os/version: Microsoft Windows 10 Pro 2009 (64 bit)
- os/kernel: 10.0.22000.318 (x86_64)
- os/type: windows
- os/arch: amd64
- go/version: go1.17.2
- go/linking: dynamic
- go/tags: cmount
Which cloud storage system are you using? (eg Google Drive)
none
The command you were trying to run (eg rclone copy /tmp remote:tmp
)
rclone config --config=comment.conf
The rclone config contents with secrets removed.
see above
A log from the command with the -vv
flag
rclone config --config=comment.conf -vv
2021/11/12 18:53:40 DEBUG : rclone: Version "v1.57.0" starting with parameters ["rclone" "config" "--config=comment.conf" "-vv"]
2021/11/12 18:53:40 DEBUG : Using config file from "C:\\data\\rclone\\scripts\\comment.conf"
Current remotes:
Name Type
==== ====
01 alias
02 alias
e) Edit existing remote
n) New remote
d) Delete remote
r) Rename remote
c) Copy remote
s) Set configuration password
q) Quit config
e/n/d/r/c/s/q> n
name> 03
Option Storage.
Type of storage to configure.
Enter a string value. Press Enter for the default ("").
Choose a number from below, or type in your own value.
Storage> alias
2021/11/12 18:53:46 DEBUG : 03: config in: state="*all", result=""
2021/11/12 18:53:46 DEBUG : 03: config out: out=&{State:*all-set,0,false Option: OAuth:<nil> Error: Result:}, err=<nil>
2021/11/12 18:53:46 DEBUG : 03: config: reading config parameter "remote"
Option remote.
Remote or path to alias.
Can be "myremote:path/to/dir", "myremote:bucket", "myremote:" or "/local/path".
Enter a string value. Press Enter for the default ("").
remote> 03
2021/11/12 18:53:47 DEBUG : 03: config in: state="*all-set,0,false", result="03"
2021/11/12 18:53:47 DEBUG : Saving config "remote" in section "03" of the config file
2021/11/12 18:53:47 DEBUG : Keeping previous permissions for config file: -rw-rw-rw-
2021/11/12 18:53:47 DEBUG : 03: config out: out=&{State:*all,1,false Option:<nil> OAuth:<nil> Error: Result:}, err=<nil>
2021/11/12 18:53:47 DEBUG : 03: config in: state="*all,1,false", result=""
2021/11/12 18:53:47 DEBUG : 03: config out: out=&{State:*postconfig Option:<nil> OAuth:<nil> Error: Result:}, err=<nil>
2021/11/12 18:53:47 DEBUG : 03: config in: state="*postconfig", result=""
2021/11/12 18:53:47 DEBUG : 03: config in: state="", result=""
2021/11/12 18:53:47 DEBUG : 03: config out: out=<nil>, err=<nil>
2021/11/12 18:53:47 DEBUG : 03: config out: out=<nil>, err=<nil>
2021/11/12 18:53:47 DEBUG : Keeping previous permissions for config file: -rw-rw-rw-
--------------------
[03]
type = alias
remote = 03
--------------------
y) Yes this is OK (default)
e) Edit this remote
d) Delete this remote
y/e/d> y
2021/11/12 18:53:48 DEBUG : Keeping previous permissions for config file: -rw-rw-rw-
Current remotes:
Name Type
==== ====
01 alias
02 alias
03 alias
e) Edit existing remote
n) New remote
d) Delete remote
r) Rename remote
c) Copy remote
s) Set configuration password
q) Quit config
e/n/d/r/c/s/q> q
2021/11/12 18:53:50 DEBUG : rclone: Version "v1.57.0" finishing with parameters ["rclone" "config" "--config=comment.conf" "-vv"]