mirror of https://github.com/trapexit/mergerfs.git
				
				
			
			You can not select more than 25 topics
			Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.
		
		
		
		
		
			
		
			
				
					
					
						
							26 lines
						
					
					
						
							556 B
						
					
					
				
			
		
		
		
			
			
			
		
		
	
	
							26 lines
						
					
					
						
							556 B
						
					
					
				| #!/usr/bin/env sh | |
|  | |
| if [ $# != 3 ]; then | |
|     echo "usage: $0 <cache-fs> <base-pool> <days-old>" | |
|     exit 1 | |
| fi | |
| 
 | |
| CACHEFS="${1}" | |
| BASEPOOL="${2}" | |
| DAYS_OLD=${3} | |
| 
 | |
| find "${CACHEFS}" -type f -atime +${DAYS_OLD} -printf '%P\n' | \ | |
|     rsync \ | |
|         --files-from=- \ | |
|         --archive \ | |
|         --acls \ | |
|         --xattrs \ | |
|         --atimes \ | |
|         --hard-links \ | |
|         --one-file-system \ | |
|         --quiet \ | |
|         --preallocate \ | |
|         --remove-source-files \ | |
|         --log-file=/tmp/mergerfs-cache-rsync.log \ | |
|         "${CACHEFS}/" \ | |
|         "${BASEPOOL}/"
 |