PHP Classes

Generate Mysqli Backup: Download backup from SQL dump using MySQLi

Recommend this page to a friend!
  Info   View files Example   View files View files (3)   DownloadInstall with Composer Download .zip   Reputation   Support forum (1)   Blog    
Ratings Unique User Downloads Download Rankings
Not yet rated by the usersTotal: 166 All time: 8,890 This week: 455Up
Version License PHP version Categories
mysqlibackup 1.0.0GNU General Publi...5PHP 5, Databases, Systems administration


This class can download backup from SQL dump using MySQLi.

It can connect to a given database with the user and password of an account and generates SQL statements to restore the database tables and records when the SQL statements are executed.

The generated SQL statements are served as a file for download with a given file name or an automatic name based on the current date and time.

Picture of Vivek moyal
  Performance   Level  
Name: Vivek moyal is available for providing paid consulting. Contact Vivek moyal .
Classes: 7 packages by
Country: India India
Age: ???
All time rank: 35719 in India India
Week rank: 17 Up2 in India India Up
Innovation award
Innovation award
Nominee: 2x

Winner: 1x


include_once 'backupClass.php';
$backupClass=new backupClass();

$password ="";
$tables=false; // Backup whole database tables if want specific than comment this line and uncomment the next line
//$tables=array("snapshot"); //backup specific tables only: array("mytable1","mytable2",...)

echo $backupClass->EXPORT_TABLES($host, $user, $pass, $dbName, $tables, $backupName);




This class will backup whole database or selected tables from the database

For exporting the database as .sql file use this function.

echo $backupClass->EXPORT_TABLES($host, $user, $pass, $dbName, $tables, $backupName);

  Files folder image Files  
File Role Description
Plain text file backupClass.php Class Class source
Accessible without login Plain text file index.php Example Example script
Accessible without login Plain text file Doc. Documentation

 Version Control Unique User Downloads Download Rankings  
This week:0
All time:8,890
This week:455Up