PHP Classes
elePHPant
Icontem

PHP MySQLDump Table Chunks: Dump MySQL tables in chunks of limited size

Recommend this page to a friend!
  Info   View files Example   View files View files (2)   DownloadInstall with Composer Download .zip   Reputation   Support forum   Blog    
Last Updated Ratings Unique User Downloads Download Rankings
2014-11-13 (5 years ago) RSS 2.0 feedNot yet rated by the usersTotal: 302 All time: 7,245 This week: 328Up
Version License PHP version Categories
mysql-chunk-dump 1.0BSD License5PHP 5, Databases, Systems administration
Description Author

This class can dump MySQL tables in chunks of limited size.

It can query a given MySQL database table to get statistics of its size.

Then the class calls the mysqldump program multiple times to output the SQL INSERT statments to multiple files, each one with a limited number of rows.

Innovation Award
PHP Programming Innovation award nominee
November 2014
Number 5


Prize: One downloadable copy of PhpED Professional
One common way to generate backups of a database is to dump to a file a list of SQL statements that can be used later to recreate each database table. That is what the mysqldump does for generating dumps of MySQL databases.

Tables with many records may generate large database dump files.

This class implements a solution to avoid generating database dump files that exceed a given limit in size.

It queries a given MySQL database to get statistics of the size of each database table. Then it runs the mysqldump program as many times as necessary to generate separate database dump files of each database table, so each has a limited number of rows.

This way it assures that each database dump file does not exceed a given size limit.

Manuel Lemos
Name: Ovidiu Lesei is available for providing paid consulting. Contact Ovidiu Lesei .
Classes: 5 packages by
Country: Romania Romania
Age: 37
All time rank: 135436 in Romania Romania
Week rank: 303 Up2 in Romania Romania Up
Innovation award
Innovation award
Nominee: 2x

 

  Files folder image Files  
File Role Description
Accessible without login Plain text file example.php Example Example
Plain text file mysqlDump.php Class Class

 Version Control Unique User Downloads Download Rankings  
 0%
Total:302
This week:0
All time:7,245
This week:328Up