Re: MySQL Database backup

From: Date: Mon, 27 Aug 2001 16:40:34 +0000
Subject: Re: MySQL Database backup
References: 1  Groups: php.general 
Request: Send a blank email to php-general+get-64686@lists.php.net to get a copy of this message
Thanks a lot. ----- Original Message ----- From: "Augusto Cesar Castoldi" <accastoldi@yahoo.com.br> To: "Alex Sofronie" <maxx@mail.dntis.ro> Sent: Monday, August 27, 2001 6:22 PM Subject: Re: [PHP] MySQL Database backup > Alex, > > i'm using the crontab of linux to run a php script: > > in crontab: "wget -q > http://localhost/backup/backup.php. > > This script uses the MyPHPAdmin > (http://phpwizard.net/projects/phpMyAdmin/) dump, he > "fopen" the php script of MyAdmin (tbl_dump.php) and > write to a file the "result". This is the script > > ------------------------------------------------ > function backup($url, $file) > { > if (file_exists($file)) > unlink($file); > if ($fd = fopen($url, "r")) > { > $aux = fread($fd, 10000000); > fclose($fd); > $fd = fopen($file, "aw" ); > fwrite($fd, $aux); > fclose($fd); > } else { > $fd = fopen("logs.txt", "aw"); > fwrite($fd, "\n\nErro na URL: $url\n\n"); > fclose($fd); > } > } > $file = "fiesc.sql"; > $url = > "http://$vendaval/libs/phpadmin2/tbl_dump.php?drop=1&showcolumns=yes&use_bac kquotes=1&what=data&server=1&lang=pt-br&db=fiesc"; > backup($url, $file); > -------------------------------------------------- > > see you, > > Augusto > > > > > --- Alex Sofronie <maxx@mail.dntis.ro> escreveu: > I > tried find a solution to backup a mysql database > > using php but i didn't > > find anything but the binary file transfer solution > > (just open and binary > > copy all the files in my database directory). But > > this is not a desired > > solution because it involves some security holes > > that I cannot afford. > > Can anyone tell me where can i learn more about > > this? Or some simple :) and > > security holes free solution? > > > > Thanks all. > > Alex Sofronie > > maxx@mail.dntis.ro > > > > > > -- > > PHP General Mailing List (http://www.php.net/) > > To unsubscribe, e-mail: > > php-general-unsubscribe@lists.php.net > > For additional commands, e-mail: > > php-general-help@lists.php.net > > To contact the list administrators, e-mail: > > php-list-admin@lists.php.net > > > > ____________________________________________________________________________ ___________________ > Yahoo! GeoCities > Tenha seu lugar na Web. Construa hoje mesmo sua home page no Yahoo! GeoCities. É fácil e grátis! > http://br.geocities.yahoo.com/ >

« previous php.general (#64686) next »