Skip to content

Backup your MySQL databases by selecting tables (or not), structure and data (or only structure), using compression (or not), and multilanguage

License

Notifications You must be signed in to change notification settings

grisinformatica/MySqlBackupLite

 
 

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

21 Commits
 
 
 
 
 
 
 
 
 
 

Repository files navigation

MySql Backup Lite Class

MySql Backup Lite is a class written in PHP designed to backup a MySql database into a file.

Once backup is done you can download it or save it on the disk.

Forked from ahierrohdez / MySqlBackupLite with the following changes/upgrades:

  • Contemplate null values
  • File compression
  • Additional header data
  • Select which tables to back up (all by default)
  • Select which tables to skip in the backup
  • Select which tables will be backed up only structure (no data)
  • Multilanguage: English (default), Español

Examples

Example 1

Stores a SQL backup file to a writable folder

include('MySqlBackupLite.php');

$arrayDbConf['host'] = 'dbHost';
$arrayDbConf['user'] = 'dbUser';
$arrayDbConf['pass'] = 'dbPassword';
$arrayDbConf['name'] = 'dbName';

try {
    $bck = new MySqlBackupLite($arrayDbConf);
    $bck->setFileDir('./backups/');
    $bck->setFileName('backupFileNae.sql');
    $bck->backUp();
    $bck->saveToFile();
}
catch(Exception $e) {
    echo $e;
}```

About

Backup your MySQL databases by selecting tables (or not), structure and data (or only structure), using compression (or not), and multilanguage

Topics

Resources

License

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published

Languages

  • PHP 100.0%