fix old snapshot and bookmark deletion
This commit is contained in:
		
							parent
							
								
									6f4f2c4a63
								
							
						
					
					
						commit
						8fc701b40e
					
				
					 1 changed files with 3 additions and 3 deletions
				
			
		|  | @ -46,13 +46,13 @@ if [[ "$?" == "0" ]] | ||||||
| then | then | ||||||
| 
 | 
 | ||||||
|   # delete old local bookmarks |   # delete old local bookmarks | ||||||
|   for destroyable_bookmark in $(zfs list -t bookmark -H -o name "$dataset" | grep "^$dataset#$bookmark_prefix") |   for destroyable_bookmark in $(zfs list -t bookmark -H -o name "$source_dataset" | grep "^$source_dataset#$bookmark_prefix") | ||||||
|   do |   do | ||||||
|     zfs destroy "$destroyable_bookmark" |     zfs destroy "$destroyable_bookmark" | ||||||
|   done |   done | ||||||
| 
 | 
 | ||||||
|   # delete snapshots from bookmarks (except newest, even of not necessary; maybe for resuming tho) |   # delete remote snapshots from bookmarks (except newest, even of not necessary; maybe for resuming tho) | ||||||
|   for destroyable_snapshot in $($ssh sudo zfs list -t snapshot -H -o name "$dataset" | grep "^$dataset@$bookmark_prefix" | grep -v "$new_bookmark") |   for destroyable_snapshot in $($ssh sudo zfs list -t snapshot -H -o name "$target_dataset" | grep "^$target_dataset@$bookmark_prefix" | grep -v "$new_bookmark") | ||||||
|   do |   do | ||||||
|     $ssh sudo zfs destroy "$destroyable_snapshot" |     $ssh sudo zfs destroy "$destroyable_snapshot" | ||||||
|   done |   done | ||||||
|  |  | ||||||
		Loading…
	
		Reference in a new issue