From 1c6b268465d01655553553d01c03d4944138a4b0 Mon Sep 17 00:00:00 2001
From: tbrehm <t.brehm@ispconfig.org>
Date: Wed, 04 Jan 2012 10:55:45 -0500
Subject: [PATCH] Added: FS#1954 - Add a config file backup option in the ispconfig updater - FS#1898 Added username after client name in IP address list
---
install/lib/update.lib.php | 6 +++++-
1 files changed, 5 insertions(+), 1 deletions(-)
diff --git a/install/lib/update.lib.php b/install/lib/update.lib.php
index c794d39..5a3c9bb 100644
--- a/install/lib/update.lib.php
+++ b/install/lib/update.lib.php
@@ -56,7 +56,11 @@
//if(filesize('existing_db.sql') < 30000) die('Possible problem with dumping the database. We will stop here. Please check the file existing_db.sql');
// create a backup copy of the ispconfig database in the root folder
- $backup_db_name = '/root/ispconfig_db_backup_'.@date('Y-m-d_h-i').'.sql';
+ if(isset($conf['backup_path'])) {
+ $backup_db_name = $conf['backup_path'].'/ispconfig_db_backup.sql';
+ } else {
+ $backup_db_name = '/root/ispconfig_db_backup_'.@date('Y-m-d_H-i').'.sql';
+ }
copy('existing_db.sql',$backup_db_name);
chmod($backup_db_name, 0700);
chown($backup_db_name, 'root');
--
Gitblit v1.9.1