dev-master
9999999-dev http://github.com/hglattergotz/dbbackupCreate backup files of databases or individual tables and restore from dump files
MIT
The Requires
- php >=5.3.3
- symfony/process >=2.1.0
mysql backup dump
Wallogit.com
2017 © Pedro Peláez
Create backup files of databases or individual tables and restore from dump files
No longer maintained! Please use http://github.com/hglattergotz/dbcmd instead, (*1)
Programmatically create dump files of an entire database or individual tables in a PHP application. Restore from dump files., (*2)
Using Composer:, (*4)
{
"require": {
"hgg/dbbackup": "dev-master"
}
}
Download source and manually add to project:, (*5)
Pull Requests for additional database engines welcome!, (*6)
use HGG\DbBackup\CmdBuilder\MySql;
use HGG\DbBackup\DbBackup;
try
{
$output = '';
$backup = new DbBackup(new MySql());
$backup->backupDb('username', 'password', 'localhost', 'database',
'backupFile', array(), &$output);
// log $output
}
catch (\Exception $e)
{
// deal with failure
}
use HGG\DbBackup\CmdBuilder\MySql;
use HGG\DbBackup\DbBackup;
try
{
$output = '';
$backup = new DbBackup(new MySql());
$backup->backupTables('username', 'password', 'localhost', 'database',
array('table1', 'table2'), 'backupFile', array(), &$output);
// log $output
}
catch (\Exception $e)
{
// deal with failure
}
use HGG\DbBackup\CmdBuilder\MySql;
use HGG\DbBackup\DbRestore;
try
{
$output = '';
$restore = new DbRestore(new MySql());
$restore->restore('username', 'password', 'localhost', 'database',
'backupFile', array(), &$output);
// log $output
}
catch (\Exception $e)
{
// deal with failure
}
Create backup files of databases or individual tables and restore from dump files
MIT
mysql backup dump