@frappe.whitelist()
def get_backup():
 delete_temp_backups()
 odb = BackupGenerator(frappe.conf.db_name, frappe.conf.db_name, frappe.conf.db_password, db_host=frappe.db.host)
 odb.get_backup()
 recipient_list = odb.send_email()
 frappe.msgprint(_(u'Download link for your backup will be emailed on the following email address: {0}').format(u', '.join(recipient_list)))

@ frappe . whitelist ( ) def get_backup ( ) : delete_temp_backups ( ) odb = BackupGenerator ( frappe . conf . db_name , frappe . conf . db_name , frappe . conf . db_password , db_host = frappe . db . host ) odb . get_backup ( ) recipient_list = odb . send_email ( ) frappe . msgprint ( _ ( u'Download link for your backup will be emailed on the following email address: {0}' ) . format ( u', ' . join ( recipient_list ) ) )
this function is executed when the user clicks on toos > download backup .