What is the problem you are having with rclone?
I have a handful of permission denied errors when syncing to gdrive. When I try to run the command with sudo, I get an error that suggests the my token may have expired. This is not the case as it works correctly when sudo is removed. I am able to do a local backup using sudo.
What is your rclone version (output from rclone version
)
rclone v1.55.0
- os/type: linux
- os/arch: arm64
- go/version: go1.16.2
- go/linking: static
- go/tags: cmount
Which OS you are using and how many bits (eg Windows 7, 64 bit)
linux arm64
Which cloud storage system are you using? (eg Google Drive)
local and google drive
The command you were trying to run (eg rclone copy /tmp remote:tmp
)
sudo rclone sync pi:/ google:/habackup/21-06-10.2 --progress --filter-from /docker/rclonefilter
and
rclone sync pi:/ google:/habackup/21-06-10.2 --progress --filter-from /docker/rclonefilter
The rclone config contents with secrets removed.
[google]
type = drive
client_id = [secret?]
client_secret = [secret]
scope = drive
token = [secret?]
[pi]
type = local
copy_links = true
no_check_updated = true
A log from the command with the -vv
flag
2021/06/10 15:41:18 DEBUG : Using config file from "/root/.config/rclone/rclone.conf"
2021/06/10 15:41:18 DEBUG : rclone: Version "v1.55.0" starting with parameters ["rclone" "sync" "pi:/" "google:/habackup/21-06-10.2" "-vv" "--progress" "--filter-from" "/docker/rclonefilter"]
2021/06/10 15:41:18 DEBUG : Creating backend with remote "pi:/"
2021/06/10 15:41:18 DEBUG : Creating backend with remote "google:/habackup/21-06-10.2"
2021/06/10 15:41:18 DEBUG : google: Loaded invalid token from config file - ignoring
2021/06/10 15:41:18 DEBUG : google: Token refresh failed try 1/5: oauth2: cannot fetch token: 400 Bad Request
Response: {
"error": "invalid_grant",
"error_description": "Bad Request"
}
2021/06/10 15:41:19 DEBUG : google: Loaded invalid token from config file - ignoring
2021/06/10 15:41:19 DEBUG : google: Token refresh failed try 2/5: oauth2: cannot fetch token: 400 Bad Request
Response: {
"error": "invalid_grant",
"error_description": "Bad Request"
}
2021/06/10 15:41:20 DEBUG : google: Loaded invalid token from config file - ignoring
2021/06/10 15:41:20 DEBUG : google: Token refresh failed try 3/5: oauth2: cannot fetch token: 400 Bad Request
Response: {
"error": "invalid_grant",
"error_description": "Bad Request"
}
2021/06/10 15:41:21 DEBUG : google: Loaded invalid token from config file - ignoring
2021/06/10 15:41:22 DEBUG : google: Token refresh failed try 4/5: oauth2: cannot fetch token: 400 Bad Request
Response: {
"error": "invalid_grant",
"error_description": "Bad Request"
}
2021/06/10 15:41:23 DEBUG : google: Loaded invalid token from config file - ignoring
2021/06/10 15:41:23 DEBUG : google: Token refresh failed try 5/5: oauth2: cannot fetch token: 400 Bad Request
Response: {
"error": "invalid_grant",
"error_description": "Bad Request"
}
2021/06/10 15:41:24 Failed to create file system for "google:/habackup/21-06-10.2": couldn't find root directory ID: Get "https://www.googleapis.com/drive/v3/files/root?alt=json&fields=id&prettyPrint=false&supportsAllDrives=true": couldn't fetch token - maybe it has expired? - refresh with "rclone config reconnect google:": oauth2: cannot fetch token: 400 Bad Request
Response: {
"error": "invalid_grant",
"error_description": "Bad Request"
}