PHPackages                             djunehor/db-backup-restore - 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. [File &amp; Storage](/categories/file-storage)
4. /
5. djunehor/db-backup-restore

ActiveLibrary[File &amp; Storage](/categories/file-storage)

djunehor/db-backup-restore
==========================

A PHP module to backup DB as well as restore from backup

3431PHP

Since Oct 11Pushed 6y ago1 watchersCompare

[ Source](https://github.com/djunehor/db-backup-restore)[ Packagist](https://packagist.org/packages/djunehor/db-backup-restore)[ RSS](/packages/djunehor-db-backup-restore/feed)WikiDiscussions master Synced 2w ago

READMEChangelogDependenciesVersions (1)Used By (0)

DB BackUp and Restore Class

#### Issues and pull requests welcome.

[](#issues-and-pull-requests-welcome)

A PHP Class that helps take backup of DB as well as restore from backup.

### Table of Contents

[](#table-of-contents)

- [Installation](#installation)
- [Usage](#usage)
- [Acknowledgement](#acknowledgement)
- [Contribute](#contribute)

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

[](#installation)

You will need [PHP 7.x](https://www.php.net/) and [composer](https://getcomposer.org/download/).

Install using composer: `composer require djunehor/db-backup-restore`

Usage
-----

[](#usage)

```
use \Djunehor\DB\BackUp;

/**
	 *
	 *
	 * @param string $host
	 * @param string $username
	 * @param string $password
	 * @param string $database
	 * @param string $charset
	 * @param string $lang
	 */
$db = new BackUp( 'localhost', 'root', '', 'test', 'utf8', 'en' );

// To backup DB
$db->backup ();

//To restore from backup
$db->restore ( __DIR__.'/backup/20121027194215_all_v1.sql')
```

Acknowledgment
--------------

[](#acknowledgment)

Adapted from the class created by [yanue](https://github.com/yanue/Dbmanage.git)

Contribute
----------

[](#contribute)

Check out the issues on GitHub and/or make a pull request to contribute!

###  Health Score

21

—

LowBetter than 18% of packages

Maintenance20

Infrequent updates — may be unmaintained

Popularity12

Limited adoption so far

Community8

Small or concentrated contributor base

Maturity36

Early-stage or recently created project

 Bus Factor1

Top contributor holds 100% of commits — single point of failure

How is this calculated?**Maintenance (25%)** — Last commit recency, latest release date, and issue-to-star ratio. Uses a 2-year decay window.

**Popularity (30%)** — Total and monthly downloads, GitHub stars, and forks. Logarithmic scaling prevents top-heavy scores.

**Community (15%)** — Contributors, dependents, forks, watchers, and maintainers. Measures real ecosystem engagement.

**Maturity (30%)** — Project age, version count, PHP version support, and release stability.

### Community

Maintainers

![](https://avatars.githubusercontent.com/u/20708833?v=4)[Zacchaeus Bolaji](/maintainers/djunehor)[@djunehor](https://github.com/djunehor)

---

Top Contributors

[![djunehor](https://avatars.githubusercontent.com/u/20708833?v=4)](https://github.com/djunehor "djunehor (3 commits)")

### Embed Badge

![Health badge](/badges/djunehor-db-backup-restore/health.svg)

```
[![Health](https://phpackages.com/badges/djunehor-db-backup-restore/health.svg)](https://phpackages.com/packages/djunehor-db-backup-restore)
```

###  Alternatives

[venveo/craft-compress

Create smart zip files from Craft assets on the fly

124.7k](/packages/venveo-craft-compress)

PHPackages © 2026

[Directory](/)[Categories](/categories)[Trending](/trending)[Changelog](/changelog)[Analyze](/analyze)
