Rclone 在不使用本機頻寬的條件下進行跨雲端硬碟傳輸

Rclone 在 Google 雲端硬碟有支援一項特殊的設定,可以直接在伺服器端進行傳輸:

--drive-server-side-across-configs

Allow server side operations (eg copy) to work across different drive configs.

This can be useful if you wish to do a server side copy between two different Google drives. Note that this isn’t enabled by default because it isn’t easy to tell if it will work between any two configurations.

  • Config: server_side_across_configs
  • Env Var: RCLONE_DRIVE_SERVER_SIDE_ACROSS_CONFIGS
  • Type: bool
  • Default: false

編輯 ~/.config/rclone/rclone.conf,加入 server_side_across_configs = true

 1
 2
 3
 4
 5
 6
 7
 8
 9
10
11
12
13
[calos-google-personal-drive]
type = drive
scope = drive
server_side_across_configs = true
token = xxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxx
root_folder_id = xxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxx

[calos-google-team-drive]
type = drive
scope = drive
server_side_across_configs = true
token = xxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxx
team_drive = xxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxx

接著進行傳輸,同時透過 iftop 觀察網路頻寬,可以發現到 rclone 回報的速度約莫在 1.3 GBps 左右,但是 iftop 回報的流量只有數十 kbps,代表成功的直接在伺服器端進行傳輸,而不消耗本機頻寬,而且速度快多了。

image


Reference:

comments powered by Disqus