mirror of
				https://github.com/ItsDrike/dotfiles.git
				synced 2025-10-31 16:06:36 +00:00 
			
		
		
		
	Allow user rsync options in backup script
This commit is contained in:
		
							parent
							
								
									8f37b3e30e
								
							
						
					
					
						commit
						76e40cd44a
					
				
					 1 changed files with 2 additions and 2 deletions
				
			
		|  | @ -6,7 +6,7 @@ | ||||||
| # This script will respect .rsync-filter files, which can be used | # This script will respect .rsync-filter files, which can be used | ||||||
| # to define custom exclude rules for files/dirs in which it is present | # to define custom exclude rules for files/dirs in which it is present | ||||||
| 
 | 
 | ||||||
| if [ $# -ne 2 ]; then | if [ $# -ge 2 ]; then | ||||||
| 	echo "Invalid amount of arguments passed!" | 	echo "Invalid amount of arguments passed!" | ||||||
| 	echo "Arguments: [Source path] [Backup path]" | 	echo "Arguments: [Source path] [Backup path]" | ||||||
| 	echo "  Source path: directory to be backed up, usually '/'" | 	echo "  Source path: directory to be backed up, usually '/'" | ||||||
|  | @ -26,6 +26,6 @@ rsync -avHAXS \ | ||||||
| 	--delete \ | 	--delete \ | ||||||
| 	--filter='dir-merge /.rsync-filter' \ | 	--filter='dir-merge /.rsync-filter' \ | ||||||
| 	--link-dest "${LATEST_LINK}" \ | 	--link-dest "${LATEST_LINK}" \ | ||||||
| 	"${SOURCE_DIR}/" "${BACKUP_PATH}" | 	"${@:3}" "${SOURCE_DIR}/" "${BACKUP_PATH}" | ||||||
| 
 | 
 | ||||||
| ln -sf "${BACKUP_PATH}" "${LATEST_LINK}" | ln -sf "${BACKUP_PATH}" "${LATEST_LINK}" | ||||||
|  |  | ||||||
		Loading…
	
	Add table
		Add a link
		
	
		Reference in a new issue