process exclusions
This commit is contained in:
		
							parent
							
								
									bcb6c9c5ef
								
							
						
					
					
						commit
						ff98225921
					
				| @ -261,15 +261,22 @@ elif [ "$operation" = 'viewarchive' ]; then | |||||||
|     borg list ::"${archiveName}" |     borg list ::"${archiveName}" | ||||||
| # restore operations | # restore operations | ||||||
| elif [ "$operation" = 'restore' ]; then | elif [ "$operation" = 'restore' ]; then | ||||||
|  |     cd "$restorePath" || consoleError 4 'Could not change to restore directory.' | ||||||
|     if [ -z "$fileName" ]; then |     if [ -z "$fileName" ]; then | ||||||
|         # restore entire archive |         # restore entire archive | ||||||
|         cd "$restorePath" || consoleError 4 'Could not change to restore directory.' |         if [ "$exclusions" ]; then | ||||||
|  |             borg --show-rc ${commonOptions} extract ${restoreOptions} ::"${archiveName}" --exclude "${exclusions}" | ||||||
|  |         else | ||||||
|             borg --show-rc ${commonOptions} extract ${restoreOptions} ::"${archiveName}" |             borg --show-rc ${commonOptions} extract ${restoreOptions} ::"${archiveName}" | ||||||
|  |         fi | ||||||
|     elif [ "$fileName" ]; then |     elif [ "$fileName" ]; then | ||||||
|         # restore single file |         # restore file/pattern | ||||||
|         cd "$restorePath" || consoleError 4 'Could not change to restore directory.' |         if [ "$exclusions" ]; then | ||||||
|  |             borg --show-rc ${commonOptions} extract ${restoreOptions} ::"${archiveName}" "${fileName}" --exclude "${exclusions}" | ||||||
|  |         else | ||||||
|             borg --show-rc ${commonOptions} extract ${restoreOptions} ::"${archiveName}" "${fileName}" |             borg --show-rc ${commonOptions} extract ${restoreOptions} ::"${archiveName}" "${fileName}" | ||||||
|         fi |         fi | ||||||
|  |     fi | ||||||
| fi | fi | ||||||
| 
 | 
 | ||||||
| 
 | 
 | ||||||
|  | |||||||
		Loading…
	
		Reference in New Issue
	
	Block a user