MysqlArchiver allows you to create archives ( backups ) of your MySQL databases and restore those archives whenever necessary. It's simple, efficient and very helpful.
IMPORTANT: when restoring an archive, all the data that wasn't in that backup WILL BE DELETED. so be ware.
1. Archive an entire database or a few selected tables of your choice.
2. Restore any archive very easily in a matter of seconds.
3. Control the name and the location of the archive file.
1. PHP 7+
3. That's it.
This script is made using OOP so we'll be using objects most of the time.
You'll find a coding example in the screenshots.
Let's talk about each object in-depth for a bit.
1. MysqlArchiver\Config; is the configuration object. it's used to store database information like dbname, host, username and password. You can pass that information as an array in the constructor of the config object OR you can use dedicated methods to do so.
- To set the dbname you'd use $config->setDBName( 'your_db_name_here' ); - To set the host you'd use $config->setHost( 'your_host_here' ); - To set the username you'd use $config->setUsername( 'your_username_here' ); - To set the password you'd use $config->setPassword( 'your_password_here' );
2. MysqlArchiver\Archiver; is the core archiving object. it accepts a config object in the constructor ( which is the object you created in step #1 ). It contains 2 methods; export and import. - export is the method used to export the database you specified in the config object. it accepts 2 optional parameters; 1. array $tables. an array of table names you'd like to be archived. defaults to an empty array which means archive all tables in a given database. 2. string $filename. a string of the location of the archived name defaults to null which will use a long string of the time and date of the created archive. test it for yourself to make a better sense of it.
public function export( array $tables = , string $filename = null ) : string
You'll find more in-depth documentation in the readme.MD file in the root directory of the script
Future product updates
Quality checked by Codester
Lowest price guarantee
A regular license allows an item to be used in one project for either personal or commercial use by you or on behalf of a client. The item cannot be offered for resale either on its own or as part of a project. Distribution of source files is not permitted.
An extended license allows an item to be used in unlimited projects for either personal or commercial use. The item cannot be offered for resale "as-is". It is allowed to distribute/sublicense the source files as part of a larger project.