mirror of
				https://github.com/kevinveenbirkenbach/docker-volume-backup.git
				synced 2025-11-04 10:38:00 +00:00 
			
		
		
		
	Added --delete-excluded
This commit is contained in:
		@@ -28,9 +28,9 @@ do
 | 
				
			|||||||
    docker run --rm --volumes-from "$docker_container_name" -v "$native_backups_mount:$docker_backups_mount" "kevinveenbirkenbach/alpine-rsync" sh -c "
 | 
					    docker run --rm --volumes-from "$docker_container_name" -v "$native_backups_mount:$docker_backups_mount" "kevinveenbirkenbach/alpine-rsync" sh -c "
 | 
				
			||||||
    test -d $source_path &&
 | 
					    test -d $source_path &&
 | 
				
			||||||
    mkdir -p \"$destination_path\" &&
 | 
					    mkdir -p \"$destination_path\" &&
 | 
				
			||||||
    rsync -ab --delete --backup-dir=\"$backup_dir_path\" $source_path $destination_path ||
 | 
					    rsync -ab --delete --delete-excluded --backup-dir=\"$backup_dir_path\" $source_path $destination_path ||
 | 
				
			||||||
    mkdir -p \"$(dirname "$destination_path")\" &&
 | 
					    mkdir -p \"$(dirname "$destination_path")\" &&
 | 
				
			||||||
    rsync -ab --delete --backup-dir=\"$(dirname "$backup_dir_path")\" $source_path $(dirname "$destination_path")";
 | 
					    rsync -ab --delete --delete-excluded --backup-dir=\"$(dirname "$backup_dir_path")\" $source_path $(dirname "$destination_path")";
 | 
				
			||||||
    if [ "$destination_path" == "$first_destination_path" ]
 | 
					    if [ "$destination_path" == "$first_destination_path" ]
 | 
				
			||||||
      then
 | 
					      then
 | 
				
			||||||
        echo "Cloning first to latest..."
 | 
					        echo "Cloning first to latest..."
 | 
				
			||||||
 
 | 
				
			|||||||
		Reference in New Issue
	
	Block a user