From bedf6602f266572a9dfafa94d8cd74a0e76805d2 Mon Sep 17 00:00:00 2001 From: Rushabh Mehta Date: Fri, 15 May 2015 10:38:10 +0530 Subject: [PATCH] [backups] keep for 48 hours --- frappe/utils/backups.py | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/frappe/utils/backups.py b/frappe/utils/backups.py index fd09293c56..6b0b4e183f 100644 --- a/frappe/utils/backups.py +++ b/frappe/utils/backups.py @@ -37,7 +37,7 @@ class BackupGenerator: """ #Check if file exists and is less than a day old #If not Take Dump - if not force: + if not force: last_db, last_file = self.get_recent_backup(older_than) else: last_db, last_file = False, False @@ -147,7 +147,7 @@ def scheduled_backup(older_than=6, ignore_files=False, backup_path_db=None, back return odb def new_backup(older_than=6, ignore_files=False, backup_path_db=None, backup_path_files=None, force=False): - delete_temp_backups(older_than=168) + delete_temp_backups(older_than = frappe.conf.keep_backups_for_hours or 48) odb = BackupGenerator(frappe.conf.db_name, frappe.conf.db_name,\ frappe.conf.db_password, backup_path_db=backup_path_db, backup_path_files=backup_path_files, db_host = frappe.db.host)