|Ratings|| ||Unique User Downloads|| ||Download Rankings|
|Not yet rated by the users||Total: 374 ||All time: 6,751 This week: 177|
This class can backup and restore MySQL database dumping SQL file.
It takes the name of a given MySQL database and connects to a database server using MySQLi. Then it generates a file with SQL statements that can be used later to recreate the database SQL statements in case the it is necessary.
The class can also read a file previously generated by this class, so it can restore the tables and records of a MySQL database that was run the backup process described above.
DB BackUp and Restore Class
Issues and pull requests welcome.
A PHP Class that helps take backup of DB as well as restore from backup.
Table of Contents
You will need PHP 7.x and composer.
Install using composer:
composer require djunehor/db-backup-restore
* @param string $host
* @param string $username
* @param string $password
* @param string $database
* @param string $charset
* @param string $lang
$db = new BackUp( 'localhost', 'root', '', 'test', 'utf8', 'en' );
// To backup DB
//To restore from backup
$db->restore ( __DIR__.'/backup/20121027194215_all_v1.sql')
Adapted from the class created by yanue
Check out the issues on GitHub and/or make a pull request to contribute!
||Applications that use this package
No pages of applications that use this class were specified.
If you know an application of this package, send a message to the author to add a link here.