PHPackages                             varienos/mysql-backup - PHPackages - PHPackages  [Skip to content](#main-content)[PHPackages](/)[Directory](/)[Categories](/categories)[Trending](/trending)[Leaderboard](/leaderboard)[Changelog](/changelog)[Analyze](/analyze)[Collections](/collections)[Log in](/login)[Sign up](/register)

1. [Directory](/)
2. /
3. [Database &amp; ORM](/categories/database)
4. /
5. varienos/mysql-backup

ActiveLibrary[Database &amp; ORM](/categories/database)

varienos/mysql-backup
=====================

Modern MySQL database backup and restore utility with compression support

v1.0.0(7mo ago)121MITPHPPHP &gt;=7.4

Since Oct 12Pushed 7mo agoCompare

[ Source](https://github.com/varienos/mysql-backup)[ Packagist](https://packagist.org/packages/varienos/mysql-backup)[ Docs](https://github.com/varienos/mysql-backup)[ RSS](/packages/varienos-mysql-backup/feed)WikiDiscussions main Synced 1mo ago

READMEChangelogDependencies (1)Versions (2)Used By (0)

MySQL Backup PHP
================

[](#mysql-backup-php)

Modern, efficient MySQL database backup and restore utility for PHP 7.4+

Features
--------

[](#features)

- **Modern PHP**: Built with PHP 7.4+ features (type hints, PDO, PSR-4 autoloading)
- **Memory Efficient**: Batch processing to handle large databases without exhausting memory
- **Compression Support**: Optional gzip compression to save disk space
- **Backup &amp; Restore**: Full backup and restore functionality
- **Progress Tracking**: Real-time logging and progress information
- **Flexible Table Selection**: Backup all tables or select specific ones
- **CLI &amp; Web Compatible**: Works in both command-line and web environments
- **Zero Dependencies**: Core functionality requires only PHP and PDO extension

Requirements
------------

[](#requirements)

- PHP &gt;= 7.4
- PDO MySQL extension
- MySQL/MariaDB database

Installation
------------

[](#installation)

### Using Composer (Recommended)

[](#using-composer-recommended)

```
composer require varienos/mysql-backup
```

### Manual Installation

[](#manual-installation)

1. Clone or download this repository:

    ```
    git clone https://github.com/varienos/mysql-backup.git
    cd mysql-backup
    ```
2. Install dependencies:

    ```
    composer install
    ```
3. Verify installation:

    ```
    php test-autoload.php
    ```

### Quick Install with Make

[](#quick-install-with-make)

If you have `make` installed:

```
make install      # Install dependencies
make check        # Validate installation
make test         # Run tests
```

Quick Start
-----------

[](#quick-start)

### Creating a Backup

[](#creating-a-backup)

```
