目錄表

使用 rclone 同步 Google Drive 檔案

因為愈來愈多檔案存放在 Google Drive, 所以要考慮一個自動的機制將檔案同步回自己的電腦主機內.

安裝方式

Alpine 3

CentOS 7

設定 rclone 對 Google Drive / Photos Library API 的 config

使用 rclone 讀取 Google Drive 的語法

設定每天 2:00 執行一次

  • 如果要設定可以自動寄出 log 內容, 可先參考 CentOS7 設定 mailx 寄出 log 方式
  • 將 /etc/crontab 改成類似以下的語法, 將原本產生的 /tmp/syncGooglePhotos.log 內容寄給 [email protected]
    :
    0 2 * * * root rclone copy --max-age 48h --no-traverse -v JonathanGooglePhotos:/ /nas_Photos/GooglePhotos/ 2>&1 | tee /tmp/syncGooglePhotos.log ; cat /tmp/syncGooglePhotos.log | mail -s "RClone Sync Log" [email protected]

更新 rclone 方式

參考網址