Many php applications prefer to backup the mysql database from within the application and save it as an archive.
The mysqldump commandline utility can be used to perform this function of backing up a mysql database as sql file.
The command would be like this :
The above command shall dump the database named $db_name into a sql file in directory $dir. This sql file shall be next zipped using php's Ziparchive class.
In the above example backups/backup.sql is the path to the sql fil...