因為愈來愈多檔案存放在 Google Drive, 所以要考慮一個自動的機制將檔案同步回自己的電腦主機內.
apk add rclone rclone version
yum install curl unzip man-db
curl https://rclone.org/install.sh | bash
rclone version
rclone config
rclone ls JonathanGooglePhotos:/
rclone lsd JonathanGooglePhotos:/
rclone copy -v JonathanGooglePhotos:/ /nas_Photos/GooglePhotos/
vi /etc/crontab
: 0 2 * * * root rclone copy --max-age 48h --no-traverse -v JonathanGooglePhotos:/ /nas_Photos/GooglePhotos/ 2>&1 | tee /tmp/syncGooglePhotos.log
systemctl restart crond
: 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]
curl https://rclone.org/install.sh | bash
Processing manual pages under /usr/share/man/sk... Purging old database entries in /usr/share/man/tr... Processing manual pages under /usr/share/man/tr... Purging old database entries in /usr/share/man/da... Processing manual pages under /usr/share/man/da... Purging old database entries in /usr/local/share/man... Processing manual pages under /usr/local/share/man... 0 man subdirectories contained newer manual pages. 0 manual pages were added. 0 stray cats were added. 0 old database entries were purged. rclone v1.54.0 has successfully installed. Now run "rclone config" for setup. Check https://rclone.org/docs/ for more details.