What is the problem you are having with rclone?
I'm trying to sync all the files on my Google Shared Drive remote to a new Box Business remote but I'm having problems with the refresh token. I'm using JWT for access and rclone config has the client ID/secret. The relevant config is below.
Run the command 'rclone version' and share the full output of the command.
rclone v1.64.0-beta.7174.3ed4a2e96
- os/version: ubuntu 20.04 (64 bit)
- os/kernel: 5.15.0-78-generic (x86_64)
- os/type: linux
- os/arch: amd64
- go/version: go1.21rc3
- go/linking: static
- go/tags: none
Which cloud storage system are you using? (eg Google Drive)
Box
The command you were trying to run (eg rclone copy /tmp remote:tmp)
None of the commands I'm running on the box remote work (including lsd, copy, sync, or size) after an hour from the last refresh token. Per Box's documentation, this behavior is expected as the token needs to be refreshed after 60 minutes. So in order to refresh, I have to run rclone config reconnect box:, and then everything runs as it should again for 60 minutes. Rinse and repeat.
The rclone config contents with secrets removed.
[box]
type = box
client_id = [redacted]
client_secret = [redacted]
box_config_file = /opt/sa-creds/box_config.json
root_folder_id = [redacted]
box_sub_type = enterprise
token = {"access_token":"[redacted].","token_type":"bearer","expiry":"2023-07-25T20:50:17.267151799-05:00"}
[box_chunker]
type = chunker
remote = box:
chunk_size = 4.9Gi
name_format = * - [Chunk #####]
A log from the command with the -vv flag
When running rclone lsd box:, I get the error below. Other commands show essentially the same error.
2023/07/25 20:51:32 ERROR : : error listing: couldn't list files: Get "https://api.box.com/2.0/folders/218658551144/items?fields=type%2Cid%2Csequence_id%2Cetag%2Csha1%2Cname%2Csize%2Ccreated_at%2Cmodified_at%2Ccontent_created_at%2Ccontent_modified_at%2Citem_status%2Cshared_link%2Cowned_by&limit=1000&usemarker=true": token expired and there's no refresh token - manually refresh with "rclone config reconnect box:"
2023/07/25 20:51:32 Failed to lsd with 2 errors: last error was: couldn't list files: Get "https://api.box.com/2.0/folders/218658551144/items?fields=type%2Cid%2Csequence_id%2Cetag%2Csha1%2Cname%2Csize%2Ccreated_at%2Cmodified_at%2Ccontent_created_at%2Ccontent_modified_at%2Citem_status%2Cshared_link%2Cowned_by&limit=1000&usemarker=true": token expired and there's no refresh token - manually refresh with "rclone config reconnect box:"
Edit:
I figured it could be useful to include my box_config.json file as well, although not much left after removing private data:
{
"boxAppSettings": {
"clientID": "[redacted]",
"clientSecret": "[redacted]",
"appAuth": {
"publicKeyID": "w1cw2pf2",
"privateKey": "-----BEGIN ENCRYPTED PRIVATE KEY-----[redacted]-----END ENCRYPTED PRIVATE KEY-----\n",
"passphrase": "[redacted]"
}
},
"enterpriseID": "[redacted]"
}