Rclone enables an OSS vault on several Cloud Storages.
And it makes it possible to use Google Drive on Linux.
Create new remote definition and create new vault under the remote.
For example
{
"google-drive-Foo": { "type": "drive" },
"google-drive-Foo-Vault": {
"remote": "google-drive-Foo:vault",
"type": "crypt"
}
}
If you are actually setting up Google Drive as this, you should get client_id and the client_secret in Google API Console.
See rclone with Google Drive for detail.
This article also helps to setup.
Assume you encrypted the config
rclone config touch
hx "$(rclone config file | tail -1)"
Don't save the file in this repository even if it is encrypted with agenix or sops-nix.
Always need the token when modifying config is too annoy.
Now it reads from RCLONE_PASSWORD_COMMAND
.
Or directly set RCLONE_CONFIG_PASS
as this.
(read -s
does not work in zsh)
export RCLONE_CONFIG_PASS="$(hx)"
winget install --exact --id WinFsp.WinFsp
rclone mount google-drive-Foo-Vault: G: --vfs-cache-mode writes --log-level INFO
mount_to="$(mktemp --directory)"
echo "Mounting Google Drive on $mount_to"
rclone mount google-drive-Foo-Vault: "$mount_to" --vfs-cache-mode writes --log-level INFO
Don't use https://github.com/germanztz/gnome-shell-extension-rclone-manager with the encrypted rclone config. (Looks like supporting, but I don't favor the giving echo PASS style as written by rclone author. And cannot be intgerated with env style of RCLONE_PASSWORD_COMMAND
and RCLONE_CONFIG_PASS
)