| 
					
				 | 
			
			
				@@ -17,6 +17,14 @@ echo "Starting backup of '{{ container.name }}:{{ volume | regex_replace(':.*') 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				       --suffix-keep-extension \ 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				       --exclude "*log" \ 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				       --log-file="$LOG_FILE" -v 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				+if [[ $? > 0 ]]; then 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				+  curl \ 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				+    -H "Title: rclone backup error" \ 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				+    -H "Priority: urgent" \ 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				+    -H "Tags: warning" \ 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				+    -d "Backup of {{ container.name }}:{{ volume | regex_replace(':.*') }} on $(hostname) had an error. Please check logs at $LOG_FILE" \ 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				+    https://ntfy.warchildstory.com/{{ ntfy_server_notifications }} 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				+fi 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				 echo "Finished backup of '{{ container.name }}:{{ volume | regex_replace(':.*') }}'." | ts >> "$LOG_FILE" 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				  
			 | 
		
	
		
			
				 | 
				 | 
			
			
				 {% endif %} 
			 | 
		
	
	
		
			
				| 
					
				 | 
			
			
				@@ -36,7 +44,12 @@ echo "Starting backup of photos..." | ts >> "$LOG_FILE" 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				 /usr/bin/rclone copy /mnt/nas/private/Photos b2-photos:current --fast-list --immutable --exclude "*DS_Store" --log-file=$PHOTOS_LOG -v | ts | tee -a "$LOG_FILE" 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				  
			 | 
		
	
		
			
				 | 
				 | 
			
			
				 if [[ $? > 0 ]]; then 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				-  mail -s "[$(hostname)] rclone - Photos Backup Error" "$EMAIL_ADDRESS" < $PHOTOS_LOG 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				+  curl \ 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				+    -H "Title: rclone backup error" \ 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				+    -H "Priority: urgent" \ 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				+    -H "Tags: warning" \ 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				+    -d "Backup of Photos on $(hostname) had an error. Please check logs at $LOG_DIR/$(basename -- $PHOTOS_LOG)" \ 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				+    https://ntfy.warchildstory.com/{{ ntfy_server_notifications }} 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				 fi 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				  
			 | 
		
	
		
			
				 | 
				 | 
			
			
				 mv "$PHOTOS_LOG" "$LOG_DIR" 
			 | 
		
	
	
		
			
				| 
					
				 | 
			
			
				@@ -51,7 +64,12 @@ echo "Starting backup of data..." | ts >> "$LOG_FILE" 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				 /usr/bin/rclone copy /mnt/nas/private/Data b2-data:current --backup-dir=b2-data:old --suffix=-$(date +%Y-%m-%d) --fast-list --suffix-keep-extension --exclude "*DS_Store" --log-file=$DATA_LOG -v | ts | tee -a "$LOG_FILE" 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				  
			 | 
		
	
		
			
				 | 
				 | 
			
			
				 if [[ $? > 0 ]]; then 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				-  mail -s "[$(hostname)] rclone - Data Backup Error" "$EMAIL_ADDRESS" < $PHOTOS_LOG 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				+  curl \ 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				+    -H "Title: rclone backup error" \ 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				+    -H "Priority: urgent" \ 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				+    -H "Tags: warning" \ 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				+    -d "Backup of Data on $(hostname) had an error. Please check logs at $LOG_DIR/$(basename -- $DATA_LOG)" \ 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				+    https://ntfy.warchildstory.com/{{ ntfy_server_notifications }} 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				 fi 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				  
			 | 
		
	
		
			
				 | 
				 | 
			
			
				 mv "$DATA_LOG" "$LOG_DIR" 
			 | 
		
	
	
		
			
				| 
					
				 | 
			
			
				@@ -66,7 +84,12 @@ echo "Starting backup of music..." | ts >> "$LOG_FILE" 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				 /usr/bin/rclone copy /mnt/nas/public b2-music:current --backup-dir=b2-music:old --suffix=-$(date +%Y-%m-%d) --fast-list --suffix-keep-extension --include=Music/** --include="Music Videos"/** --log-file=$MUSIC_LOG -v | ts | tee -a "$LOG_FILE" 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				  
			 | 
		
	
		
			
				 | 
				 | 
			
			
				 if [[ $? > 0 ]]; then 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				-  mail -s "[$(hostname)] rclone - Music Backup Error" "$EMAIL_ADDRESS" < $MUSIC_LOG 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				+  curl \ 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				+    -H "Title: rclone backup error" \ 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				+    -H "Priority: urgent" \ 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				+    -H "Tags: warning" \ 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				+    -d "Backup of Music on $(hostname) had an error. Please check logs at $LOG_DIR/$(basename -- $MUSIC_LOG)" \ 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				+    https://ntfy.warchildstory.com/{{ ntfy_server_notifications }} 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				 fi 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				  
			 | 
		
	
		
			
				 | 
				 | 
			
			
				 mv "$MUSIC_LOG" "$LOG_DIR" 
			 | 
		
	
	
		
			
				| 
					
				 | 
			
			
				@@ -80,7 +103,12 @@ echo "Starting backup of recipes..." | ts >> "$LOG_FILE" 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				 /usr/bin/rclone copy /mnt/nas/public b2-data:current --backup-dir=b2-data:old --suffix=-$(date +%Y-%m-%d) --fast-list --suffix-keep-extension --include=Recipes/**  --log-file=$RECIPES_LOG -v | ts | tee -a "$LOG_FILE" 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				  
			 | 
		
	
		
			
				 | 
				 | 
			
			
				 if [[ $? > 0 ]]; then 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				-  mail -s "[$(hostname)] rclone - Recipes Backup Error" "$EMAIL_ADDRESS" < $RECIPES_LOG 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				+  curl \ 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				+    -H "Title: rclone backup error" \ 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				+    -H "Priority: urgent" \ 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				+    -H "Tags: warning" \ 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				+    -d "Backup of Recipes on $(hostname) had an error. Please check logs at $LOG_DIR/$(basename -- $RECIPES_LOG)" \ 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				+    https://ntfy.warchildstory.com/{{ ntfy_server_notifications }} 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				 fi 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				  
			 | 
		
	
		
			
				 | 
				 | 
			
			
				 mv "$RECIPES_LOG" "$LOG_DIR" 
			 |