diff --git a/frappe/commands/site.py b/frappe/commands/site.py index ec479d76ca..bcffc3fbc7 100755 --- a/frappe/commands/site.py +++ b/frappe/commands/site.py @@ -404,9 +404,9 @@ def backup(context, with_files=False, backup_path=None, backup_path_db=None, bac frappe.init(site=site) frappe.connect() odb = scheduled_backup(ignore_files=not with_files, backup_path=backup_path, backup_path_db=backup_path_db, backup_path_files=backup_path_files, backup_path_private_files=backup_path_private_files, backup_path_conf=backup_path_conf, force=True, verbose=verbose, compress=compress) - except Exception as e: + except Exception: if verbose: - print("Backup failed for {0}. Database or site_config.json may be corrupted".format(site)) + click.echo("Backup failed for Site {0}. Database or site_config.json may be corrupted".format(site), fg="red") exit_code = 1 continue @@ -418,6 +418,8 @@ def backup(context, with_files=False, backup_path=None, backup_path_db=None, bac if with_files: print("Public file: {0}\nPrivate file: {1}".format(odb.backup_path_files, odb.backup_path_private_files)) + click.echo("Backup for Site {0} has been successfully completed{1}".format(site, " with files" if with_files else ""), fg="green") + frappe.destroy() if not context.sites: raise SiteNotSpecifiedError