What is the problem you are having with rclone?
I've have set up a GDrive connection and added it as a service with systemctl (running ubuntu).
This was working until I managed to leak my keys and had to reset the google client id/secret.
I tried re-running rclone edit on the drive, but I'm really not certain whether I selected the correct choices.
[Feedback: the user interface of rclone edit is really not what I would call helpful - if anyone is interested I'm happy to provide additional details].
I've also tried the rclone disconnect command but I get the following error:
rclone config disconnect GDrive:
Error: Google drive root '' doesn't support Disconnect
I've also tried rclone about but it returns nothing:
rclone about GDrive:
The rclone logs are showing:
2022/08/30 10:57:20 ERROR : IO error: couldn't list directory: Get "https://www.googleapis.com/drive/v3/files
?alt=json&fields=files%28id%2Cname%2Csize%2Cmd5Checksum%2Ctrashed%2CexplicitlyTrashed
%2CmodifiedTime
%2CcreatedTime%2CmimeType%2Cparents%2CwebViewLink%2CshortcutDetails%2CexportLinks
%2CresourceKey%29%2CnextPageToken%2CincompleteSearch&includeItemsFromAllDrives=true
&pageSize=1000&prettyPrint=false&q=trashed%3Dfalse+and+%28%270AGjmuZJIHKZXUk9PVA%27+in
+parents%29&supportsAllDrives=true": couldn't fetch token - maybe it has expired?
- refresh with "rclone config reconnect GDrive:": oauth2: cannot fetch token: 401 Unauthorized
Response: {
"error": "invalid_client",
"error_description": "Unauthorized"
}
2022/08/30 10:57:24 INFO : Signal received: terminated
2022/08/30 10:57:24 ERROR : /home/bsutton/gdrive: Failed to unmount: exit status 1: fusermount: failed to unmount /home/bsutton/gdrive: Device or resource busy
2022/08/30 10:57:24 INFO : Exiting...
The contents of my rclone@.service file are:
cat ~/.config/systemd/user/rclone@.service
# User service for Rclone mounting
#
# Place in ~/.config/systemd/user/
# File must include the '@' (ex rclone@.service)
# As your normal user, run
# systemctl --user daemon-reload
# You can now start/enable each remote by using rclone@<remote>
# systemctl --user enable rclone@Gdrive
# systemctl --user start rclone@GDrive
[Unit]
Description=rclone: Remote FUSE filesystem for cloud storage config GDrive
Documentation=man:rclone(1)
After=network-online.target
Wants=network-online.target
AssertPathIsDirectory=/home/bsutton/gdrive
[Service]
Type=notify
ExecStart= \
/usr/bin/rclone mount \
--config=%h/.config/rclone/rclone.conf \
--vfs-cache-mode writes \
--vfs-cache-max-size 100M \
--log-level INFO \
--log-file /tmp/rclone-GDrive.log \
--umask 022 \
--allow-other \
GDrive: /home/bsutton/gdrive
ExecStop=/bin/fusermount -u /home/bsutton/gdrive
[Install]
WantedBy=default.target
I've also tried to delete the drive but that doesn't work.
rclone delete GDrive
2022/08/30 11:29:56 ERROR : : error listing: directory not found
2022/08/30 11:29:56 ERROR : Attempt 1/3 failed with 2 errors and: directory not found
2022/08/30 11:29:56 ERROR : : error listing: directory not found
2022/08/30 11:29:56 ERROR : Attempt 2/3 failed with 2 errors and: directory not found
2022/08/30 11:29:56 ERROR : : error listing: directory not found
2022/08/30 11:29:56 ERROR : Attempt 3/3 failed with 2 errors and: directory not found
2022/08/30 11:29:56 Failed to delete with 2 errors: last error was: directory not found
rclone delete GDrive:
rclone listremotes
GDrive:
``
#### Run the command 'rclone version' and share the full output of the command.
rclone version
rclone v1.59.1
- os/version: ubuntu 22.04 (64 bit)
- os/kernel: 5.15.0-43-generic (x86_64)
- os/type: linux
- os/arch: amd64
- go/version: go1.18.5
- go/linking: static
- go/tags: none
#### 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`)
The systemd service is now failing to start:
systemctl --user start rclone@GDrive
Assertion failed on job for rclone@GDrive.service.
It was running (and generating the above logs) until I shut it down and tried to restart it.
I've check that rclone isn't running:
ps -A | grep rclone
#### The rclone config contents with secrets removed.
<!-- You should use 3 backticks to begin and end your paste to make it readable. -->
cat ~/.config/rclone/rclone.conf
[GDrive]
type = drive
scope = drive
token = {"access_token":"XXXXXXXXXXXXXXXX","token_type":"Bearer","refresh_token":"YYYYYY","expiry":"2022-08-30T12:09:54.38324542+10:00"}
team_drive = ZZZZZ
client_id =
client_secret =
root_folder_id =
I've not tried to manually update these. I though running rclone config would do this?
#### A log from the command with the `-vv` flag
<!-- You should use 3 backticks to begin and end your paste to make it readable. Or use a service such as https://pastebin.com or https://gist.github.com/ -->
A log from which command? Do you mean the one that is failing?
If so posted above.
rclone about -vv GDrive:
2022/08/30 11:29:11 DEBUG : rclone: Version "v1.59.1" starting with parameters ["rclone" "about" "-vv" "GDrive:"]
2022/08/30 11:29:11 DEBUG : Creating backend with remote "GDrive:"
2022/08/30 11:29:11 DEBUG : Using config file from "/home/bsutton/.config/rclone/rclone.conf"
2022/08/30 11:29:12 DEBUG : Google drive root '': read info from Shared Drive "Accounts"
2022/08/30 11:29:12 DEBUG : 4 go routines active