What is the problem you are having with rclone?
It is not directly involved with rclone I think, but rclone is used, so I think I am asking for a little help with the command...
The problem is that a bash built in function is not being expanded as the flag that I need rclone command to read and execute.
More details below.
What is your rclone version (output from rclone version
)
rclone v1.56.0
- go/version: go1.16.5
- go/linking: static
- go/tags: none
Which OS you are using and how many bits (eg Windows 7, 64 bit)
- os/version: linuxmint 19.2 (64 bit)
- os/kernel: 4.15.0-153-generic (x86_64)
- os/type: linux
- os/arch: amd64
Which cloud storage system are you using? (eg Google Drive)
Mega
The command you were trying to run (eg rclone copy /tmp remote:tmp
)
"$RCLONEBIN" mount "$SERVPROVIDER:/${REMFOLDER}" "$HOME/${SERVPROVIDER}/${REMFOLDER}" "$@" &
where:
- $RCLONEBIN is a variable that expands to the full path and name of the rclone binary installed in my system.
- $SERVPROVIDER is a variable that expands to the name of the cloud storage provider selected at runtime.
- $REMFOLDER is a variable that expands to the name of the remote folder that I want to mount in my local system.
- $HOME is auto explained...
- $@ is a bash built in function that should expand to the flag that I want rclone to read and execute, in this case the flag I want to execute is "--vfs-cache-mode writes" (without the quotes)
- & is a bash built in function that lets put the bash run command in the background.
NOTE:
The flag that the bash function $@ should run is stored in another bash script that is run before the rclone command, and this command is like this:
source $HOME/bin/servprovider_mount_yad --vfs-cache-mode writes
So, this bash script runs first, the command should invoke and load the second script that has the main rclone command and then at last, I expect to $@ get expanded to the said flag in the command above.
But the fact is that it seems the flag is not being sent the rclone command.
The rclone config contents with secrets removed.
[MEGA]
type = mega
user = user@emailprovider.com
pass = blablablabla
A log from the command with the -vv
flag
2021/08/29 18:07:26 DEBUG : rclone: Version "v1.56.0" starting with parameters ["/usr/bin/rclone" "mount" "MEGA:/Documents" "/home/user/MEGA/Documents" "-vv"]
2021/08/29 18:07:26 DEBUG : Creating backend with remote "MEGA:/Documents"
2021/08/29 18:07:26 DEBUG : Using config file from "/home/user/.config/rclone/rclone.conf"
2021/08/29 18:07:31 DEBUG : fs cache: renaming cache item "MEGA:/Documents" to be canonical "MEGA:Documents"
2021/08/29 18:07:31 INFO : mega root 'documentos': poll-interval is not supported by this remote
2021/08/29 18:07:31 NOTICE: mega root 'documentos': --vfs-cache-mode writes or full is recommended for this remote as it can't stream
2021/08/29 18:07:31 DEBUG : mega root 'documentos': Mounting on "/home/user/MEGA/Documents"
2021/08/29 18:07:31 DEBUG : : Root:
2021/08/29 18:07:31 DEBUG : : >Root: node=/, err=<nil>
2021/08/29 18:07:31 DEBUG : /: Lookup: name=".xdg-volume-info"
2021/08/29 18:07:31 DEBUG : /: >Lookup: node=<nil>, err=no such file or directory
2021/08/29 18:07:31 DEBUG : /: Lookup: name=".Trash"
2021/08/29 18:07:31 DEBUG : /: >Lookup: node=<nil>, err=no such file or directory
2021/08/29 18:07:31 DEBUG : /: Attr:
2021/08/29 18:07:31 DEBUG : /: >Attr: attr=valid=1s ino=0 size=0 mode=drwxrwxr-x, err=<nil>
2021/08/29 18:07:31 DEBUG : /: Lookup: name="autorun.inf"
2021/08/29 18:07:31 DEBUG : /: >Lookup: node=<nil>, err=no such file or directory
2021/08/29 18:07:31 DEBUG : /: Lookup: name=".Trash-1000"
2021/08/29 18:07:31 DEBUG : /: >Lookup: node=<nil>, err=no such file or directory
2021/08/29 18:07:31 DEBUG : /: ReadDirAll:
2021/08/29 18:07:31 DEBUG : /: >ReadDirAll: item=2, err=<nil>
2021/08/29 18:07:31 DEBUG : /: Attr:
2021/08/29 18:07:31 DEBUG : /: >Attr: attr=valid=1s ino=0 size=0 mode=drwxrwxr-x, err=<nil>
2021/08/29 18:07:31 DEBUG : /: ReadDirAll:
2021/08/29 18:07:31 DEBUG : /: >ReadDirAll: item=2, err=<nil>
2021/08/29 18:07:31 DEBUG : /: Attr:
2021/08/29 18:07:31 DEBUG : /: >Attr: attr=valid=1s ino=0 size=0 mode=drwxrwxr-x, err=<nil>
2021/08/29 18:07:31 DEBUG : /: ReadDirAll:
2021/08/29 18:07:31 DEBUG : /: >ReadDirAll: item=2, err=<nil>
2021/08/29 18:07:31 DEBUG : /: Attr:
2021/08/29 18:07:31 DEBUG : /: >Attr: attr=valid=1s ino=0 size=0 mode=drwxrwxr-x, err=<nil>
2021/08/29 18:07:31 DEBUG : /: ReadDirAll:
2021/08/29 18:07:31 DEBUG : /: >ReadDirAll: item=2, err=<nil>
2021/08/29 18:07:31 DEBUG : /: Attr:
2021/08/29 18:07:31 DEBUG : /: >Attr: attr=valid=1s ino=0 size=0 mode=drwxrwxr-x, err=<nil>
2021/08/29 18:07:31 DEBUG : /: ReadDirAll:
2021/08/29 18:07:31 DEBUG : /: >ReadDirAll: item=2, err=<nil>
2021/08/29 18:07:31 DEBUG : /: Attr:
2021/08/29 18:07:31 DEBUG : /: >Attr: attr=valid=1s ino=0 size=0 mode=drwxrwxr-x, err=<nil>
2021/08/29 18:07:31 DEBUG : /: ReadDirAll:
2021/08/29 18:07:31 DEBUG : /: >ReadDirAll: item=2, err=<nil>
2021/08/29 18:07:31 DEBUG : /: Attr:
2021/08/29 18:07:31 DEBUG : /: >Attr: attr=valid=1s ino=0 size=0 mode=drwxrwxr-x, err=<nil>
2021/08/29 18:07:31 DEBUG : /: ReadDirAll:
2021/08/29 18:07:31 DEBUG : /: >ReadDirAll: item=2, err=<nil>
2021/08/29 18:07:31 DEBUG : /: Attr:
2021/08/29 18:07:31 DEBUG : /: >Attr: attr=valid=1s ino=0 size=0 mode=drwxrwxr-x, err=<nil>
2021/08/29 18:07:31 DEBUG : /: ReadDirAll:
2021/08/29 18:07:31 DEBUG : /: >ReadDirAll: item=2, err=<nil>
2021/08/29 18:07:31 DEBUG : /: Attr:
2021/08/29 18:07:31 DEBUG : /: >Attr: attr=valid=1s ino=0 size=0 mode=drwxrwxr-x, err=<nil>
2021/08/29 18:07:31 DEBUG : /: ReadDirAll:
2021/08/29 18:07:31 DEBUG : /: >ReadDirAll: item=2, err=<nil>
2021/08/29 18:07:31 DEBUG : /: Attr:
2021/08/29 18:07:31 DEBUG : /: >Attr: attr=valid=1s ino=0 size=0 mode=drwxrwxr-x, err=<nil>
2021/08/29 18:07:31 DEBUG : /: ReadDirAll:
2021/08/29 18:07:31 DEBUG : /: >ReadDirAll: item=2, err=<nil>
2021/08/29 18:07:31 DEBUG : /: Attr:
2021/08/29 18:07:31 DEBUG : /: >Attr: attr=valid=1s ino=0 size=0 mode=drwxrwxr-x, err=<nil>
2021/08/29 18:07:31 DEBUG : /: ReadDirAll:
2021/08/29 18:07:31 DEBUG : /: >ReadDirAll: item=2, err=<nil>
2021/08/29 18:07:31 DEBUG : /: Attr:
2021/08/29 18:07:31 DEBUG : /: >Attr: attr=valid=1s ino=0 size=0 mode=drwxrwxr-x, err=<nil>
2021/08/29 18:07:31 DEBUG : /: ReadDirAll:
2021/08/29 18:07:31 DEBUG : /: >ReadDirAll: item=2, err=<nil>
2021/08/29 18:07:31 DEBUG : /: Attr:
2021/08/29 18:07:31 DEBUG : /: >Attr: attr=valid=1s ino=0 size=0 mode=drwxrwxr-x, err=<nil>
2021/08/29 18:07:31 DEBUG : /: ReadDirAll:
2021/08/29 18:07:31 DEBUG : /: >ReadDirAll: item=2, err=<nil>
2021/08/29 18:07:31 DEBUG : /: Attr:
2021/08/29 18:07:31 DEBUG : /: >Attr: attr=valid=1s ino=0 size=0 mode=drwxrwxr-x, err=<nil>
2021/08/29 18:07:31 DEBUG : /: ReadDirAll:
2021/08/29 18:07:31 DEBUG : /: >ReadDirAll: item=2, err=<nil>
2021/08/29 18:07:31 DEBUG : /: Attr:
2021/08/29 18:07:31 DEBUG : /: >Attr: attr=valid=1s ino=0 size=0 mode=drwxrwxr-x, err=<nil>
2021/08/29 18:07:31 DEBUG : /: ReadDirAll:
2021/08/29 18:07:31 DEBUG : /: >ReadDirAll: item=2, err=<nil>
2021/08/29 18:07:31 DEBUG : /: Attr:
2021/08/29 18:07:31 DEBUG : /: >Attr: attr=valid=1s ino=0 size=0 mode=drwxrwxr-x, err=<nil>
2021/08/29 18:07:31 DEBUG : /: ReadDirAll:
2021/08/29 18:07:31 DEBUG : /: >ReadDirAll: item=2, err=<nil>
2021/08/29 18:07:31 DEBUG : /: Attr:
2021/08/29 18:07:31 DEBUG : /: >Attr: attr=valid=1s ino=0 size=0 mode=drwxrwxr-x, err=<nil>
2021/08/29 18:07:31 DEBUG : /: ReadDirAll:
2021/08/29 18:07:31 DEBUG : /: >ReadDirAll: item=2, err=<nil>
2021/08/29 18:07:31 DEBUG : /: Attr:
2021/08/29 18:07:31 DEBUG : /: >Attr: attr=valid=1s ino=0 size=0 mode=drwxrwxr-x, err=<nil>
2021/08/29 18:07:31 DEBUG : /: ReadDirAll:
2021/08/29 18:07:31 DEBUG : /: >ReadDirAll: item=2, err=<nil>
2021/08/29 18:07:31 DEBUG : /: Attr:
2021/08/29 18:07:31 DEBUG : /: >Attr: attr=valid=1s ino=0 size=0 mode=drwxrwxr-x, err=<nil>
2021/08/29 18:07:31 DEBUG : /: ReadDirAll:
2021/08/29 18:07:31 DEBUG : /: >ReadDirAll: item=2, err=<nil>
2021/08/29 18:07:31 DEBUG : /: Attr:
2021/08/29 18:07:31 DEBUG : /: >Attr: attr=valid=1s ino=0 size=0 mode=drwxrwxr-x, err=<nil>
2021/08/29 18:07:31 DEBUG : /: ReadDirAll:
2021/08/29 18:07:31 DEBUG : /: >ReadDirAll: item=2, err=<nil>
2021/08/29 18:07:31 DEBUG : /: Attr:
2021/08/29 18:07:31 DEBUG : /: >Attr: attr=valid=1s ino=0 size=0 mode=drwxrwxr-x, err=<nil>
2021/08/29 18:07:31 DEBUG : /: ReadDirAll:
2021/08/29 18:07:31 DEBUG : /: >ReadDirAll: item=2, err=<nil>
2021/08/29 18:07:31 DEBUG : /: Attr:
2021/08/29 18:07:31 DEBUG : /: >Attr: attr=valid=1s ino=0 size=0 mode=drwxrwxr-x, err=<nil>
2021/08/29 18:07:31 DEBUG : /: ReadDirAll:
2021/08/29 18:07:31 DEBUG : /: >ReadDirAll: item=2, err=<nil>
2021/08/29 18:07:31 DEBUG : /: Attr:
2021/08/29 18:07:31 DEBUG : /: >Attr: attr=valid=1s ino=0 size=0 mode=drwxrwxr-x, err=<nil>
2021/08/29 18:07:31 DEBUG : /: ReadDirAll:
2021/08/29 18:07:31 DEBUG : /: >ReadDirAll: item=2, err=<nil>
2021/08/29 18:07:31 DEBUG : /: Lookup: name="autorun.inf"
2021/08/29 18:07:31 DEBUG : /: >Lookup: node=<nil>, err=no such file or directory
2021/08/29 18:10:52 DEBUG : rclone: Version "v1.56.0" finishing with parameters ["/usr/bin/rclone" "mount" "MEGA:/Documents" "/home/user/MEGA/Documents" "-vv"]