Jump to content


This topic is now archived and is closed to further replies.


mysql backup script

Recommended Posts

we want to backup our database with a CRONTAB and need to geenrate the php script file. We don't
know the PHP configuration as to if it is stanfdalone or not, but we will sort that out
later. The filename will haver the date of backup in it. We have not tried the below scripot, but could
you take a quick look and tell us of this should work?


$dbname=my database name;
$user = username
$password=mysql password
$filename='backup' . $todaydate .'.dmp' ;
$dumpstr="mysqldump $dbname -u $user -p $password > /home/msdsimg/backup/$filename";

Share this post

Link to post
Share on other sites


Important Information

We have placed cookies on your device to help make this website better. You can adjust your cookie settings, otherwise we'll assume you're okay to continue.