Skip to main content

Google Drive and OneDrive Remotes

Drive-like backends use OAuth flows. Setup is easy, but token lifecycle and account limits require operational discipline.

OAuth Setup Flow

  1. Run rclone config.
  2. Create a new remote (drive or onedrive).
  3. Complete browser-based auth prompt.
  4. Validate with list and small copy.

Verification Commands

rclone lsd drive-prod:
rclone lsd onedrive-prod:
rclone copy /tmp/test.txt drive-prod:healthcheck/
rclone delete drive-prod:healthcheck/test.txt

Operational Differences

TopicGoogle DriveOneDrive
API limitsPer-user and per-project quotasTenant/account API throttling
Path styleFolder-centric IDs under the hoodDrive and shared library structure
Team usageShared Drives supportSharePoint/Business integration
tip

Keep a dedicated service account or dedicated backup user for automation. Avoid personal account coupling.

Handling Token Issues

token-debug.sh
rclone config file
rclone config reconnect drive-prod:
rclone lsd drive-prod:

Common Pitfalls

PitfallConsequencePrevention
Using personal account token for server cronJob breaks when user password changesUse dedicated backup identity
Ignoring API limitsIntermittent failures under loadAdd pacing and retries
Over-broad shared drive scopeSecurity riskRestrict access to backup folder only

What's Next