PHPackages                             dutchie027/easymysqlbackup - 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. dutchie027/easymysqlbackup

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

dutchie027/easymysqlbackup
==========================

This library piggybacks on the functionality of mysqldump, creating a backup of a Maria or MySQL database. It allows you to save locally or upload to cloud storage.

0.4.0(4y ago)03[3 PRs](https://github.com/dutchie027/easyMySQLBackup/pulls)MITPHPPHP &gt;=7.4

Since Apr 1Pushed 1y ago1 watchersCompare

[ Source](https://github.com/dutchie027/easyMySQLBackup)[ Packagist](https://packagist.org/packages/dutchie027/easymysqlbackup)[ RSS](/packages/dutchie027-easymysqlbackup/feed)WikiDiscussions main Synced 5d ago

READMEChangelog (4)Dependencies (7)Versions (8)Used By (0)

Easy MySQL Backup
=================

[](#easy-mysql-backup)

[![Packagist Downloads](https://camo.githubusercontent.com/b5836d52d5ca6c0f886f039e553ec828cd4eefac6f7a70547b3d5b402ad25277/68747470733a2f2f696d672e736869656c64732e696f2f7061636b61676973742f646d2f647574636869653032372f656173796d7973716c6261636b7570)](https://packagist.org/packages/dutchie027/easymysqlbackup)[![Code Coverage](https://camo.githubusercontent.com/2709061a5a3c4efa5ef584690781202e08d557736c69700330a92f2d8b67b0a7/68747470733a2f2f636f6465636f762e696f2f67682f647574636869653032372f656173796d7973716c6261636b75702f6272616e63682f6d61696e2f67726170682f62616467652e737667)](https://codecov.io/gh/dutchie027/easymysqlbackup)[![CodeFactor](https://camo.githubusercontent.com/fc582458a643512c9bcd4e82a7bab83d5f206a8283c8e83196d9d976609e473a/68747470733a2f2f7777772e636f6465666163746f722e696f2f7265706f7369746f72792f6769746875622f647574636869653032372f656173796d7973716c6261636b75702f6261646765)](https://www.codefactor.io/repository/github/dutchie027/easymysqlbackup)[![Code Coverage](https://github.com/dutchie027/easyMySQLBackup/actions/workflows/code-coverage.yml/badge.svg)](https://github.com/dutchie027/easyMySQLBackup/actions/workflows/code-coverage.yml)[![Coding Standards](https://github.com/dutchie027/easyMySQLBackup/actions/workflows/code-standards.yml/badge.svg)](https://github.com/dutchie027/easyMySQLBackup/actions/workflows/code-standards.yml)[![Static analysis](https://github.com/dutchie027/easyMySQLBackup/actions/workflows/static-analysis.yml/badge.svg)](https://github.com/dutchie027/easyMySQLBackup/actions/workflows/static-analysis.yml)[![Tests](https://github.com/dutchie027/easyMySQLBackup/actions/workflows/tests.yml/badge.svg)](https://github.com/dutchie027/easyMySQLBackup/actions/workflows/tests.yml)

About
-----

[](#about)

This package allows you to backup a mysql database using `mysqldump` and then store it to a local file store (by default) or upload it to S3.

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

[](#installation)

Install this package as a dependency using [Composer](https://getcomposer.org).

```
composer require dutchie027/easymysqlbackup
```

You will also need to ensure you have a copy of `mysqldump` on the box this is hosted on. Also, if you want to use compression for backup and restore, you'll need `gzip` and `gunzip`.

Usage
-----

[](#usage)

The program will assume a lot of defaults if you don't have a config file, however it is highly suggested you create a config (see sample .ini below)

### Backup Locally

[](#backup-locally)

```
#!/usr/bin/php
