From 1d0e7ae3380a52392e5fdb8919e302bee6650cbd Mon Sep 17 00:00:00 2001 From: SinTan1729 Date: Mon, 17 Feb 2025 23:53:43 -0600 Subject: [PATCH] fix: Improved logging and excluded .stfolder --- OneDriveBk.sh | 25 +++++++++++++++++++++++-- 1 file changed, 23 insertions(+), 2 deletions(-) diff --git a/OneDriveBk.sh b/OneDriveBk.sh index cc37201..6d3b541 100644 --- a/OneDriveBk.sh +++ b/OneDriveBk.sh @@ -22,31 +22,52 @@ LOGFILE="/home/sintan/TempStorage/OneDriveBk.log" echo "Starting Backup at $(date)" | tee -a $LOGFILE echo "-----------------------------"$'\n' | tee -a $LOGFILE +echo "Syncing Pictures..." | tee -a $LOGFILE +echo "-----------------------------"$'\n' | tee -a $LOGFILE rclone -v --fast-list --size-only --links --bwlimit 4M sync "/home/sintan/Pictures" encrypted-onedrive:"Pictures" |& tee -a $LOGFILE +echo "Syncing Videos..." | tee -a $LOGFILE +echo "-----------------------------"$'\n' | tee -a $LOGFILE rclone -v --fast-list --size-only --links --bwlimit 4M sync "/home/sintan/Videos" encrypted-onedrive:"Videos" |& tee -a $LOGFILE -rclone -v --fast-list --size-only --links --bwlimit 4M sync "/mnt/storage/Academics" encrypted-onedrive:"Academics" |& tee -a $LOGFILE +echo "Syncing Academics..." | tee -a $LOGFILE +echo "-----------------------------"$'\n' | tee -a $LOGFILE +rclone -v --fast-list --size-only --links --bwlimit 4M sync --exclude=".stversions/**" "/mnt/storage/Academics" encrypted-onedrive:"Academics" |& tee -a $LOGFILE +echo "Syncing Zotero..." | tee -a $LOGFILE +echo "-----------------------------"$'\n' | tee -a $LOGFILE rclone -v --fast-list --size-only --links --bwlimit 4M sync "/mnt/storage/Zotero" encrypted-onedrive:"Zotero" |& tee -a $LOGFILE +echo "Syncing Music..." | tee -a $LOGFILE +echo "-----------------------------"$'\n' | tee -a $LOGFILE rclone -v --fast-list --size-only --links --bwlimit 4M sync "/mnt/storage/Music" encrypted-onedrive:"Music" |& tee -a $LOGFILE -rclone -v --fast-list --size-only --links --bwlimit 4M sync --exclude="**/.stversions/**" --exclude="/CalibreLibrary/**" \ +echo "Syncing Documents..." | tee -a $LOGFILE +echo "-----------------------------"$'\n' | tee -a $LOGFILE +rclone -v --fast-list --size-only --links --bwlimit 4M sync --exclude=".stversions/**" --exclude="/CalibreLibrary/**" \ "/mnt/storage/Documents" encrypted-onedrive:"Documents" |& tee -a $LOGFILE +echo "Syncing dotfiles..." | tee -a $LOGFILE +echo "-----------------------------"$'\n' | tee -a $LOGFILE rclone -v --fast-list --size-only --links --exclude="**/menus/**" --exclude="**/unity3d/**" \ --exclude="**/libreoffice/**" --ignore-errors --bwlimit 4M sync "/mnt/storage/dotfiles" encrypted-onedrive:"dotfiles" |& tee -a $LOGFILE +echo "Syncing DCIM..." | tee -a $LOGFILE +echo "-----------------------------"$'\n' | tee -a $LOGFILE rclone -v --fast-list --size-only --links --bwlimit 4M --exclude="**/.stfolders/**" \ --exclude="**/.trashed**" --delete-excluded sync "/home/sintan/TempStorage/DCIM" encrypted-onedrive:"DCIM" |& tee -a $LOGFILE +echo "Syncing Programs..." | tee -a $LOGFILE +echo "-----------------------------"$'\n' | tee -a $LOGFILE rclone -v --fast-list --size-only --links --bwlimit 4M --exclude="*-config/**" sync "/mnt/storage/Programs" \ encrypted-onedrive:"Programs" |& tee -a $LOGFILE +echo "Syncing Code..." | tee -a $LOGFILE +echo "-----------------------------"$'\n' | tee -a $LOGFILE rclone -v --fast-list --size-only --links --bwlimit 4M --exclude="**/.git/**" --exclude="**/.venv/**" \ sync "/mnt/storage/Code" encrypted-onedrive:"Code" |& tee -a $LOGFILE +echo "Done at $(date)" | tee -a $LOGFILE echo $'\n'"-----------------------------" | tee -a $LOGFILE echo "-----------------------------" | tee -a $LOGFILE