What is the problem you are having with rclone?
I want to sync all the folders in my Google Drive - all the ones I own and the ones which have been shared with me. However, rclone sync
only seems to sync owned folders or shared folders, but not both at the same time.
What is your rclone version (output from rclone version
)
rclone v1.50.2
- os/arch: linux/amd64
- go version: go1.13.6
This is the latest version available in the Ubuntu package archives, installed with apt install rclone
.
Which OS you are using and how many bits (eg Windows 7, 64 bit)
Ubuntu 20.04, 64 bit
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
)
rclone sync --verbose rclone-drive-id: ~/backups/google-drive/
rclone sync --verbose --drive-shared-with-me rclone-drive-id: ~/backups/google-drive/
The first command syncs all the folders that I own. The second command syncs all the folders that have been shared with me, but deletes the local copies of all the folders I own (which I expect, since the local copies don't exist on the remote I've specified).
If I run the same commands but with ls
instead of sync
, the first command lists only the files I own and the second only the files that have been shared with me.
Because of the way sync
works, I need to get owned and shared files in the same command, otherwise some files will be deleted.
All the owned and shared files were created via the Google Drive interface - I only use rclone to keep a local backup (hence the drive.readonly
scope in my config below).
The rclone config contents with secrets removed.
{
"rclone-drive-id": {
"client_id": "my-client-id",
"client_secret": "my-client-secret",
"root_folder_id": "my-root-folder",
"scope": "drive.readonly",
"token": "{\"access_token\":\"my-access-token\",\"token_type\":\"Bearer\",\"refresh_token\":\"my-refresh-token\",\"expiry\":\"2021-03-05T17:11:46.978889034Z\"}",
"type": "drive"
}
}
I am using my own client ID and client secret from an app I created via the Google API Console as per the Google Drive instructions page.
A log from the command with the -vv
flag
Can't include this log as the filenames contain sensitive data.