Skip to content

hamidsamak/phpmysqlbackup

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

14 Commits
 
 
 
 
 
 
 
 

Repository files navigation

PHP MySQL Backup

PHP MySQL Database Backup is a very simple and clean class for creating backup from MySQL databases.

Example

require_once 'phpmysqlbackup.class.php';
$phpmysqlbackup = new PHPMySQLBackup('localhost', 'root', '', 'database');
$phpmysqlbackup->backup();

Options

  1. Custom backup file name
$phpmysqlbackup->file = 'custom-file-name.sql';
  1. GZip compression
$phpmysqlbackup->compress = true;
  1. Add DROP TABLE IF EXISTS query before CREATE TABLE
$phpmysqlbackup->drop_if_exists = true;
  1. Custom table to backup
$phpmysqlbackup->tables = array('table_1', 'table_2');
  1. Backup file path
$phpmysqlbackup->path = 'backup-dir/';

Releases

No releases published

Packages

No packages published

Languages