Go Back   HowtoForge Forums | HowtoForge - Linux Howtos and Tutorials > ISPConfig 2 > Developers' Forum

Do you like HowtoForge? Please consider supporting us by becoming a subscriber.
Thread Tools Display Modes
Prev Previous Post   Next Post Next
Old 11th June 2009, 12:49
pat pat is offline
Junior Member
Join Date: Jan 2009
Posts: 9
Thanks: 2
Thanked 3 Times in 2 Posts
Default Large domain backups to browser

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.


--- 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");
Reply With Quote
The Following 2 Users Say Thank You to pat For This Useful Post:
falko (12th June 2009), till (12th June 2009)
Sponsored Links


Thread Tools
Display Modes

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is On
HTML code is Off

Forum Jump

Similar Threads
Thread Thread Starter Forum Replies Last Post
freebsd 7, samba 3, domain controller alexdimarco Suggest HOWTO 6 5th November 2010 17:54
Mail server using Postfix, Dovecot, Mysql... Postfix virtual maps doesn't work?? tarasbuljba HOWTO-Related Questions 33 28th May 2010 15:33
postfix, pop3 uvbnserved Server Operation 22 24th May 2009 22:00
Help configure Postfix to use alt port 465 or 587 BoloMarkIII Installation/Configuration 10 16th March 2009 18:57
CentoS doesn't send the emails vaio1 Installation/Configuration 18 5th November 2008 18:51

All times are GMT +2. The time now is 03:38.

Powered by vBulletin® Version 3.8.7
Copyright ©2000 - 2014, vBulletin Solutions, Inc.