Fix manual snapshots not used
This commit is contained in:
		
							parent
							
								
									0578879c54
								
							
						
					
					
						commit
						6b4daed099
					
				
					 1 changed files with 1 additions and 1 deletions
				
			
		|  | @ -111,7 +111,7 @@ fi | |||
| # Working snapshots | ||||
| 
 | ||||
| # Find snapshots | ||||
| snapshots="$( find "/mnt/${dataset}/.zfs/snapshot"/* -maxdepth 0 -name 'auto*' -type d | sed -E 's/.*-([0-9]{4}-[0-9]{2}-[0-9]{2}_[0-9]{2}-[0-9]{2})/\1\t&/' | sort -n | cut -f 2- | xargs -n1 basename )" | ||||
| snapshots="$( find "/mnt/${dataset}/.zfs/snapshot"/* -maxdepth 0 -type d | sed -E 's/.*-([0-9]{4}-[0-9]{2}-[0-9]{2}_[0-9]{2}-[0-9]{2})/\1\t&/' | sort -n | cut -f 2- | xargs -n1 basename )" | ||||
| # Use the two latest snapshots | ||||
| from_snapshot="$( tail -n2 <<< "${snapshots}" | head -n1 )" | ||||
| to_snapshot="$( tail -n2 <<< "${snapshots}" | tail -n1 )" | ||||
|  |  | |||
		Loading…
	
	Add table
		Add a link
		
	
		Reference in a new issue