From 5fba95cd5dd0af02ae23a56489a86e3548d4a434 Mon Sep 17 00:00:00 2001 From: tbrehm <t.brehm@ispconfig.org> Date: Wed, 04 Jan 2012 11:08:15 -0500 Subject: [PATCH] - improved update backup script. --- install/update.php | 12 ++++++++---- 1 files changed, 8 insertions(+), 4 deletions(-) diff --git a/install/update.php b/install/update.php index f193a71..548e114 100644 --- a/install/update.php +++ b/install/update.php @@ -135,10 +135,14 @@ exec("chmod 700 $backup_path"); //* Do the backup - swriteln('Creating backup of /usr/local/ispconfig directory...'); - exec("tar pcfz $backup_path/ispconfig_software.tar.gz /usr/local/ispconfig"); - swriteln('Creating backup of /etc directory...'); - exec("tar pcfz $backup_path/etc.tar.gz /etc"); + swriteln('Creating backup of "/usr/local/ispconfig" directory...'); + exec("tar pcfz $backup_path/ispconfig_software.tar.gz /usr/local/ispconfig 2> /dev/null",$out,$returnvar); + if($returnvar != 0) die("Backup failed. We stop here...\n"); + + swriteln('Creating backup of "/etc" directory...'); + exec("tar pcfz $backup_path/etc.tar.gz /etc 2> /dev/null",$out,$returnvar); + if($returnvar != 0) die("Backup failed. We stop here...\n"); + exec("chown root:root $backup_path/*.tar.gz"); exec("chmod 700 $backup_path/*.tar.gz"); } -- Gitblit v1.9.1