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
- Run
rclone config. - Create a new remote (
driveoronedrive). - Complete browser-based auth prompt.
- 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
| Topic | Google Drive | OneDrive |
|---|---|---|
| API limits | Per-user and per-project quotas | Tenant/account API throttling |
| Path style | Folder-centric IDs under the hood | Drive and shared library structure |
| Team usage | Shared Drives support | SharePoint/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
| Pitfall | Consequence | Prevention |
|---|---|---|
| Using personal account token for server cron | Job breaks when user password changes | Use dedicated backup identity |
| Ignoring API limits | Intermittent failures under load | Add pacing and retries |
| Over-broad shared drive scope | Security risk | Restrict access to backup folder only |