$dbhost = 'localhost'; $dbuser = 'username'; $dbpass = 'password'; $dbname = 'databasename'; $path = 'home2/tintinba/public_html/test/admin/backup/'; $backupFile = $path . $dbname . date("Y-m-d-H-i-s") . '.gz'; $command = "mysqldump --opt -h $dbhost -u $dbuser -p $dbpass $dbname | gzip > $backupFile"; system($command);
mysqldump --opt -h $dbhost -u $dbuser -p $dbpass $dbname | gzip > $backupFile
mysqldump --opt -h $dbhost -u $dbuser -p$dbpass $dbname | gzip > $backupFile
var
This content, along with any associated source code and files, is licensed under The Code Project Open License (CPOL)