backups: add option to disable encryption
While the encryption is enabled by default in reasonable cases, allow the user to disable it if he/she want to.
This commit is contained in:
		
							parent
							
								
									dfb6b384cb
								
							
						
					
					
						commit
						3914835ceb
					
				@ -46,6 +46,9 @@ def main():
 | 
				
			|||||||
                       help="The AppVM to send backups to (implies -e)")
 | 
					                       help="The AppVM to send backups to (implies -e)")
 | 
				
			||||||
    parser.add_option ("-e", "--encrypt", action="store_true", dest="encrypt", default=False,
 | 
					    parser.add_option ("-e", "--encrypt", action="store_true", dest="encrypt", default=False,
 | 
				
			||||||
                       help="Encrypts the backup")
 | 
					                       help="Encrypts the backup")
 | 
				
			||||||
 | 
					    parser.add_option ("--no-encrypt", action="store_true",
 | 
				
			||||||
 | 
					                       dest="no_encrypt", default=False,
 | 
				
			||||||
 | 
					                       help="Skip encryption even if sending the backup to VM")
 | 
				
			||||||
    parser.add_option ("-E", "--enc-algo", action="store",
 | 
					    parser.add_option ("-E", "--enc-algo", action="store",
 | 
				
			||||||
                       dest="crypto_algorithm", default=None,
 | 
					                       dest="crypto_algorithm", default=None,
 | 
				
			||||||
                       help="Specify non-default encryption algorithm. For "
 | 
					                       help="Specify non-default encryption algorithm. For "
 | 
				
			||||||
@ -89,6 +92,8 @@ def main():
 | 
				
			|||||||
 | 
					
 | 
				
			||||||
    if options.appvm or options.crypto_algorithm:
 | 
					    if options.appvm or options.crypto_algorithm:
 | 
				
			||||||
        options.encrypt = True
 | 
					        options.encrypt = True
 | 
				
			||||||
 | 
					    if options.no_encrypt:
 | 
				
			||||||
 | 
					        options.encrypt = False
 | 
				
			||||||
    files_to_backup = None
 | 
					    files_to_backup = None
 | 
				
			||||||
    try:
 | 
					    try:
 | 
				
			||||||
        files_to_backup = backup_prepare(
 | 
					        files_to_backup = backup_prepare(
 | 
				
			||||||
 | 
				
			|||||||
		Loading…
	
		Reference in New Issue
	
	Block a user