From fbf66336fbcdae7dfd6516c31b83bccf8e63108f Mon Sep 17 00:00:00 2001 From: Saurabh Date: Mon, 9 Apr 2018 15:18:55 +0530 Subject: [PATCH] [hotfix][urgent] fix backup compression (#5418) --- frappe/utils/backups.py | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/frappe/utils/backups.py b/frappe/utils/backups.py index f0729d672d..7254ba7fd4 100644 --- a/frappe/utils/backups.py +++ b/frappe/utils/backups.py @@ -65,7 +65,7 @@ class BackupGenerator: site = site.replace('.', '_') #Generate a random name using today's date and a 8 digit random number - for_db = todays_date + "-" + site + "-database.sql.gz" + for_db = todays_date + "-" + site + "-database.sql" for_public_files = todays_date + "-" + site + "-files.tar" for_private_files = todays_date + "-" + site + "-private-files.tar" backup_path = get_backup_path() @@ -119,6 +119,8 @@ class BackupGenerator: cmd_string = 'gzip %(backup_path_db)s '% args err, out = frappe.utils.execute_in_shell(cmd_string) + self.backup_path_db = "{0}.gz".format(self.backup_path_db) + def send_email(self): """ Sends the link to backup file located at erpnext/backups