Help needed: Impersonating source and destinations

I've been using rclone for a while now to migrate data from onprem and regularly make use of the impersonate feature to move home directories to Gooogle Drive MyDrives.

My question is, can I impersonate both the source and the destination endpoints? I've created endpoints for both google tenants and confirmed they are working. I've tried a few variations of commands but I think I've reached a point where I need some expert advice.

Here's the command I tried that seems closest:

rclone copy HomeO:--drive-impersonate source@email.com HomeN:Test --drive-impersonate destination@email.com -P -v --dry-run

Too many arguments, which is fair. Is there something I can do to pass the identities for both endpoints?

rclone v1.69.2

  • os/version: Microsoft Windows Server 2022 Standard 21H2 21H2 (64 bit)
  • os/kernel: 10.0.20348.3932 (x86_64)
  • os/type: windows
  • os/arch: amd64
  • go/version: go1.24.2
  • go/linking: static
  • go/tags: cmount

Both storage points are Google Workspace home drives.

[HomeN]
type = drive
client_id = XXX
client_secret = XXX
scope = drive
service_account_file = C:\Users\gareth\Downloads\smooth-comfort-459715-p0-198bc000b8e1.json
team_drive =

[HomeO]
type = drive
client_id = XXX
client_secret = XXX
scope = drive
service_account_file = C:\Users\gareth\Downloads\leafy-environs-468012-k0-8e734d0205b8.json
team_drive =

A log from the command that you were trying to run with the -vv flag

Command copy needs 2 arguments maximum: you provided 3 non flag arguments: ["HomeO:--drive-impersonate" "source@email.com" "HomeN:Test"]

Check out:

Google drive

Impersonating is with service accounts that have privs across the domain. You can only impersonate with a service account inside a domain.

and update your rclone to the latest version.

Hi,

Thanks. Both endpoints are using SA accounts from their respective domain and are confirmed to work in simple commands copying data from local drive to impersonated drives.

Thanks, updating unfortunately made no difference.

I don’t think you can impersonate both sides as it’s a global flag.

I’d imagine a feature request/change would be required if you wanted to do source / destination changes like that.

Hi,

Yeah, I thought that was the case, but thought it was worth asking!

I’ve worked around the issue by copying the data to a shared drive in the destination tenant then copying that data to the users home directory. Not a huge issue with this migration as it’s only around 150 users, but would be good if we had it built in.

rclone -v -P --drive-impersonate source@email.com copy -u HomeO: Cache:source
rclone -v -P --drive-impersonate dest@email.com copy Cache:source HomeN:GoogleDrive