Sunday, November 13, 2022

rclone and out of band flow authentication error

I needed to copy some files from our server to Google Drive. Tried to download directly to my local machine where google drive desktop had been installed. Failed twice, then realized that the error shown by Filezilla was "unable to write to local file" and not connection error - the temp folder was running out of disk space, I guess. So, tried rclone to directly transfer from the server to Google Drive. 

Rclone initially gave the out of band flow authentication error. Then I installed version 1.6 by downloading the deb file,

wget https://github.com/rclone/rclone/releases/download/v1.60.0/rclone-v1.60.0-linux-amd64.deb
sudo dpkg -i rclone-v1.60.0-linux-amd64.deb
rclone config

With that, when I choose n for whether to use auto config, it asks for a local machine with a browser which has rclone installed. So I downloaded rclone to my local machine, ran rclone as requested with the required parameters as prompted, pasted the auth key, and could create the GDrive remote. 

Since I needed to copy only a single file, instead of mounting the remote, I just did
screen 
rclone copyto src/file/path remotename:/path --progress 

The file copy was going at around 2 or 3 MBytes per second when I was transferring via my local machine on BSNL fiber with Google drive desktop in "streaming" mode. 

When doing direct server to server transfer from Azure to GDrive using this rclone method, the transfer was going approx 10x faster. 200+ Mbps.

No comments:

Post a Comment