I'm looking at methods to automate backing up a db. So instead of playing around and most likely getting frustrated when stuff doesn't work I'm gonna ask for advice first.
I found this as one method of backing up a db.
But I've read sometimes the mysqldump command is turned off so I was wondering if anyone could tell if this would work. Also any other methods of backing up a db would be greatly appreciated.Code:<?php include 'config.php'; include 'opendb.php'; $backupFile = $dbname . date("Y-m-d-H-i-s") . '.gz'; $command = "mysqldump --opt -h $dbhost -u $dbuser -p $dbpass $dbname | gzip > $backupFile"; system($command); include 'closedb.php'; ?>


LinkBack URL
About LinkBacks








