|  | @@ -0,0 +1,11 @@
 | 
	
		
			
				|  |  | +#!/bin/sh -xe
 | 
	
		
			
				|  |  | +
 | 
	
		
			
				|  |  | +# Init restic repository if neccessary
 | 
	
		
			
				|  |  | +restic snapshots &>/dev/null || restic init
 | 
	
		
			
				|  |  | +
 | 
	
		
			
				|  |  | +# Run backup job, using parameters from AWS_ACCESS_KEY_ID,
 | 
	
		
			
				|  |  | +# AWS_SECRET_ACCESS_KEY, RESTIC_PASSWORD, RESTIC_REPOSITORY
 | 
	
		
			
				|  |  | +restic backup /mnt/source
 | 
	
		
			
				|  |  | +
 | 
	
		
			
				|  |  | +# Cleanup old backups
 | 
	
		
			
				|  |  | +restic forget ${RESTIC_FORGET_ARGS}
 |