Created
January 16, 2025 03:12
-
-
Save jason9075/5e6236e2dd0be7aece835ef0ac694dbc to your computer and use it in GitHub Desktop.
Daily rclone script
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
#!/bin/bash | |
# | |
# rclone_gphotos_backup.sh | |
# 取得當前日期 (格式: YYYY-MM-DD) | |
YEAR=$(date +'%Y') | |
MONTH=$(date +'%m') | |
YEAR_MONTH="${YEAR}-${MONTH}" | |
# 備份 jason 的資料 | |
/usr/bin/rclone copy gphotos-jason:/media/by-month/${YEAR}/${YEAR_MONTH} \ | |
/srv/dev-disk-by-uuid-bcadfc37-faf1-4c2e-93fa-a513a3046e92/JasonKuanNasDrive/gphotos-jason/${YEAR}/${YEAR_MONTH} \ | |
-P | |
# 備份 alice 的資料 | |
/usr/bin/rclone copy gphotos-alice:/media/by-day/${YEAR}/${YEAR_MONTH} \ | |
/srv/dev-disk-by-uuid-bcadfc37-faf1-4c2e-93fa-a513a3046e92/JasonKuanNasDrive/gphotos-alice/${YEAR}/${YEAR_MONTH} \ | |
-P | |
# 備份 alice (hotmail) 的資料 | |
/usr/bin/rclone copy gphotos-alice-hotmail:/media/by-day/${YEAR}/${YEAR_MONTH} \ | |
/srv/dev-disk-by-uuid-bcadfc37-faf1-4c2e-93fa-a513a3046e92/JasonKuanNasDrive/gphotos-alice-hotmail/${YEAR}/${YEAR_MONTH} \ | |
-P |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment