| 
					
				 | 
			
			
				@@ -14,7 +14,7 @@ systemctl stop {{ container.name }} 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				 echo "Service '{{ container.name }}' stopped." | ts >> "$LOG_FILE" 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				 echo "Starting backup of '{{ container.name }}:{{ volume | regex_replace(':.*') }}'." | ts >> "$LOG_FILE" 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				  
			 | 
		
	
		
			
				 | 
				 | 
			
			
				-tar -czf /opt/backups/$(date +%Y-%m-%d)_{{ ansible_hostname }}_{{ container.name}}_{{ volume | regex_replace(':.*') | basename }}.tar.gz {{ volume | regex_replace(':.*') }}/ 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				+tar -czf {{ backup_tmp_dir }}/$(date +%Y-%m-%d)_{{ ansible_hostname }}_{{ container.name}}_{{ volume | regex_replace(':.*') | basename }}.tar.gz {{ volume | regex_replace(':.*') }}/ 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				  
			 | 
		
	
		
			
				 | 
				 | 
			
			
				 if [[ $? > 0 ]]; then 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				   curl \ 
			 | 
		
	
	
		
			
				| 
					
				 | 
			
			
				@@ -35,7 +35,7 @@ echo "Service '{{ container.name }}' started." | ts >> "$LOG_FILE" 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				 {% endfor %} 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				  
			 | 
		
	
		
			
				 | 
				 | 
			
			
				 echo "Backing up tarballs to B2..." | ts >> "$LOG_FILE" 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				-/usr/bin/rclone copy /opt/backups/ b2-container-data:current/{{ ansible_hostname }} \ 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				+/usr/bin/rclone copy {{ backup_tmp_dir }} b2-container-data:{{ ansible_hostname }} \ 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				     --fast-list \ 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				     --log-file="$LOG_FILE" -v 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				 echo "Finished backing up tarballs to B2." | ts >> "$LOG_FILE" 
			 |