Here are a couple of suggestions to changes to the backup routine. The first one is a pure cosmetical change and makes sure the hostname is part of the resulting filename. The second one is a little more interesting and makes sure we are not limited by available RAM when choosing output to browser rather than via FTP.
Cheers,
Pat
Code:
--- backup.php.orig 2009-05-20 19:33:53.000000000 +0200
+++ backup.php 2009-05-20 19:33:45.000000000 +0200
@@ -58,7 +58,7 @@
if(strlen($ftp_user) < 1 and $transfer == 'ftp') $go_api->errorMessage($go_api->lng("Sie haben keinen FTP Benutzernamen angegeben."));
// Erstelle Namen für Backup Datei
-$backup_file_name = "backup_".date("Y_m_d",time()).".zip";
+$backup_file_name = exec("hostname") . "-backup_".date("Y_m_d",time()).".zip";
// bestimme Web-Pfad
$server = $go_api->db->queryOneRecord("SELECT * from isp_server");
@@ -154,7 +154,7 @@
header("Content-Length: ".filesize($tgz_name));
// gebe Daten aus
- echo file_get_contents($tgz_name);
+ readfile($tgz_name);
// lösche temp Verzeichnis
if($tmp_dir != "" and stristr($tmp_dir,"/home/admispconfig/ispconfig/temp") and !stristr($tmp_dir,"../")) exec("rm -rf $tmp_dir");
Recent comments
1 day 21 min ago
1 day 7 hours ago
1 day 10 hours ago
1 day 12 hours ago
1 day 20 hours ago
2 days 6 hours ago
2 days 7 hours ago
2 days 10 hours ago
2 days 15 hours ago
2 days 15 hours ago