Bash + rclone · OneDrive ↔ Google Drive · Open-source operations guide
A Copy-Only Cloud Transfer in Bash with rclone
rclone already understands cloud pagination, retries, resumable transfers, and provider hashes. The engineering task is to wrap those primitives in a fail-closed, capacity-aware operating procedure.
Updated ; 20 minute read.
Short answer
FileArk is the simpler managed choice for large or unattended migrations: it runs the transfer online, has been tested against multi-terabyte workloads, and checks each result before completion. For operators who want a shell-controlled data path, this MIT-licensed Bash wrapper copies bounded batches through local staging, verifies both legs byte-for-byte, and never deletes source files.
Why wrap rclone instead of rebuilding every provider client
rclone gives a shell workflow a mature provider abstraction, OAuth configuration, pagination, retry behavior, resumable transfers, concurrency controls, inventory commands, and verification commands. The wrapper can therefore concentrate on migration invariants: copy-only verbs, bounded staging, capacity reserves, deterministic file lists, and durable progress.
That does not make the job automatic. The operator still owns remote configuration, token security, network uptime, process supervision, local disk, logs, provider limits, failed-object review, and destination acceptance. FileArk exists for users who want that procedure operated as a managed online workflow rather than on their workstation or server.
The script explicitly never invokes rclone move, sync, delete, purge, or rmdirs. It uses lsf and about for discovery, copy for each leg, and check --download for full-byte verification. The only removal is a verified file from the local staging directory.
Download the Bash edition and MIT license
Download the Bash and rclone transfer program
A copy-only wrapper with batch limits, local and destination reserves, full-byte verification, checkpoints, retry controls, and a network-free demo.fileark-cloud-transfer.sh · Bash 4+ · rclone · jq · MIT license
Download the MIT license
Permission notice covering both FileArk manual-transfer scripts.LICENSE-fileark-cloud-transfer.txt · MIT · plain text
Run the network-free operator demo

The demo is safe to run before rclone or jq is installed because argument parsing exits before dependency checks. The output names the prohibited destructive operations, shows both capacity reserves, and ends with the source deletion count.
chmod +x fileark-cloud-transfer.sh
bash -n fileark-cloud-transfer.sh
./fileark-cloud-transfer.sh --demo
./fileark-cloud-transfer.sh --helpInstall and configure the operator dependencies
Install a current rclone release using its official instructions and install jq from your operating system package manager. Bash 4 or newer is required because the wrapper uses strict error handling and modern conditional expressions.
Run rclone config and create two independently named remotes, for example onedrive: and gdrive:. Enter your own provider client ID and secret when policy or rate limits require dedicated OAuth applications. rclone stores OAuth tokens in its configuration file; protect that file with restrictive permissions and never bundle it with the script.
Confirm each remote with a read-only listing and quota command before running the wrapper. Use paths such as onedrive:Department/Archive when only a subtree is in scope.
rclone version
rclone config
rclone lsd onedrive:
rclone lsd gdrive:
rclone about onedrive: --json | jq
rclone about gdrive: --json | jqFreeze a deterministic inventory before moving bytes
The wrapper uses rclone lsf recursively with an explicit tab separator and the sp format, producing size followed by path. It validates that each size is numeric and each path is relative, then excludes paths already present in the verified checkpoint.
The Bash edition rejects filenames containing tabs, carriage returns, or newlines because newline-delimited --files-from-raw lists cannot represent them without ambiguity. Use the Python edition or a purpose-built inventory format when those names exist.
A path checkpoint is intentionally simple and inspectable. It assumes source paths remain stable during the run. Freeze writes to the source if possible, or regenerate and reconcile inventory when concurrent changes are expected.
rclone lsf "$SOURCE" \
--recursive \
--files-only \
--format "sp" \
--separator