Error when using --drive-server-side-across-configs with Google Drive impersonation

What is the problem you are having with rclone?

When I try to make sync using --drive-server-side-across-configs together with --drive-impersonation, it is not possible to make the sync. However, without the flag (downloading and reuploading), it works perfectly.

What is your rclone version (output from rclone version)

v1.53.3 windows/amd64
go version: go1.15.5

Which OS you are using and how many bits (eg Windows 7, 64 bit)

Windows Server 2012 R2

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)

set RCLONE_CONFIG_gdrive_IMPERSONATE=example@domain.com
set RCLONE_CONFIG_gdrive_ROOT_FOLDER_ID=root

rclone sync gdrive: dest://"Google Drive/" -vvP --checkers=10 --transfers=10 --drive-server-side-across-configs --drive-pacer-min-sleep=100ms --check-first --stats-one-line --stats=1s --log-file=C:\Users\Administrator\Documents\example@domain.com.txt --drive-use-trash=false --fast-list

The rclone config contents with secrets removed.

[gdrive]
type = drive
scope = drive
server_side_across_configs = true
service_account_file = C:\sa\1.json
service_account_file_path = C:\sa
skip_shortcuts = true

[dest]
type = drive
scope = drive
service_account_file = C:\sa\1.json
service_account_file_path = C:\sa
server_side_across_configs = true
team_drive = [hidden]

A log from the command with the -vv flag

The unique error log shows is

Failed to copy: googleapi: Error 404: File not found

Rclone correctly reads and compares both folders, but when it tries to copy server-side it says File not found. There is no error and everything works well without server-side flag, but I would like to use server-side due to bandwidth and speed.

hello and welcome to the forum,

can you post the debug log, or perhaps try to sync a single file and post that debug log?

i am not a gdrive expert but.

  • service_account_file_path, not sure what that is?
  • root_folder_id should that be a ID, not root?

Complete log: https://0bin.net/paste/oKrcJ33Q#Cb1QCxrUEbEF+7xz3Zl1BQpZ1BdYqO7fbAm9Uc4hOHz

1 file attempt (not worked): https://0bin.net/paste/84mnbIhd#izBuPv3e6QGsFD01PO9OEQVhoaX9HtZc4WUA+Sfq+K+

service_account_file_path is a folder with multiple service-accounts keys. You can use it when you have more than 1 service account.
root_folder_id can be an ID, but in this case, it is defined as root (which means, "My Drive" folder). It needs to be defined every time you make an impersonation.

thanks for the log, that will save time for one of our gdrive experts, who should stop by soon.

sorry if i am wrong but
i searched the docs and forum, could not find
service_account_file_path or service-account-file-path

hey,
you marked this solved but then deleted final post with the details of the solution.
can you share what you did to fix this?

Sorry, it was not the solution, I have marked as solution by mistake.

I was able to solve this issue by adding a new Google Drive instance to my rclone config file, like this:

[gdrive]
type = drive
scope = drive
service_account_file = C:\sa.json
skip_shortcuts = true

[gdrive2]
type = drive
scope = drive
service_account_file = C:\sa.json
skip_shortcuts = true

By having the another Google Drive instance, I just impersonated it and set a new root folder in it, like this:

set RCLONE_CONFIG_gdrive_IMPERSONATE=example@domain.com
set RCLONE_CONFIG_gdrive_ROOT_FOLDER_ID=root
set RCLONE_CONFIG_gdrive2_IMPERSONATE=example@domain.com
set RCLONE_CONFIG_gdrive2_ROOT_FOLDER_ID=[destination id]

rclone sync gdrive: gdrive2:  -vvP --checkers=10 --transfers=10 --drive-server-side-across-configs --drive-pacer-min-sleep=100ms --check-first --stats-one-line --stats=1s --log-file=C:\Users\Administrator\Documents\example@domain.com.txt --drive-use-trash=false --fast-list

Now I simply put this code at a bat file and I execute it when I need it! Hope it can help someone else! :slight_smile:

This topic was automatically closed 3 days after the last reply. New replies are no longer allowed.