PHP Classes

Danen MySQL Backup: Create database backup SQL statements 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 (3)   Blog    
Last Updated Ratings Unique User Downloads Download Rankings
2015-02-26 (5 years ago) RSS 2.0 feedNot enough user ratingsTotal: 497 All time: 5,757 This week: 356Up
Version License PHP version Categories
danen-mysql-backup 2Freely Distributable5.4PHP 5, Databases, Systems administration
Description Author

This class can create database backup SQL statements using MySQLi.

It can connect to a MySQL database table using the MySQLi extension and generates a file with SQL statements that can be used later to restore the table definition and record data of one or more database tables.

The class creates a backup file with a unique name and returns the backup file name.


Good backup/restore MySQL
Script to backup and restore databases

  Performance   Level  
Name: Gerry Danen <contact>
Classes: 3 packages by
Country: Malaysia Malaysia
Age: 70
All time rank: 21838 in Malaysia Malaysia
Week rank: 806 Up4 in Malaysia Malaysia Up


I needed a MySQL database backup function that I could call from a script and
would not rely on mysqldump or phpMyAdmin.

I found a class by Hossein Sarlak that used the older mysql interface. I wanted
the newer mysqli interface, so I set out rebuilding the class when I could not
locate Hossein Sarlak.

I found his script for sale for $25, but no indication whether it was updated.

This script is free. Use as you see fit.

Make sure to read all comments. There are some customizations needed.

Gerry Danen
26 February 2015

  Files folder image Files  
File Role Description
Plain text file danenMysqlBackup.class.php Class Main class file
Accessible without login Plain text file doBackup.php Example Shows how to call the class
Accessible without login Plain text file readme.txt Doc. Some extra information

 Version Control Unique User Downloads Download Rankings  
This week:0
All time:5,757
This week:356Up