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 This week: 1All time: 8,885 This week: 560Up
Version License PHP version Categories
mysqlibackup 1.0.0GNU General Publi...5PHP 5, Databases, Systems administration
Description 

Author

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: 35820 in India India
Week rank: 34 Up2 in India India Up
Innovation award
Innovation award
Nominee: 2x

Winner: 1x

Example

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

$host="localhost";
$user="root";
$password ="";
$dbName="webcam";
$backupName="TestDatabase.sql";
$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);

?>


Details

mysql-backup

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 README.md Doc. Documentation

 Version Control Unique User Downloads Download Rankings  
 100%
Total:166
This week:1
All time:8,885
This week:560Up