forked from coop-cloud/backup-bot-two
		
	fix(restore): don't restore everything if no backup_path is given.
This commit is contained in:
		@ -155,11 +155,14 @@ def restore(snapshot_id, target, noninteractive, volumes, container, no_commands
 | 
			
		||||
    if not no_commands and pre_commands:
 | 
			
		||||
        print(f"Run pre commands.")
 | 
			
		||||
        run_commands(pre_commands)
 | 
			
		||||
    result = restic_restore(snapshot_id=snapshot_id, include=backup_paths, target_dir=target)
 | 
			
		||||
    if backup_paths:
 | 
			
		||||
        result = restic_restore(snapshot_id=snapshot_id, include=backup_paths, target_dir=target)
 | 
			
		||||
        logger.debug(result)
 | 
			
		||||
    else:
 | 
			
		||||
        print('No paths to restore.')
 | 
			
		||||
    if not no_commands and post_commands:
 | 
			
		||||
        print(f"Run post commands.")
 | 
			
		||||
        run_commands(post_commands)
 | 
			
		||||
    logger.debug(result)
 | 
			
		||||
 | 
			
		||||
 | 
			
		||||
@cli.command()
 | 
			
		||||
 | 
			
		||||
		Reference in New Issue
	
	Block a user