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 2mo 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

20

—

LowBetter than 14% of packages

Maintenance20

Infrequent updates — may be unmaintained

Popularity12

Limited adoption so far

Community8

Small or concentrated contributor base

Maturity35

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://www.gravatar.com/avatar/dbee0bc9066fccd4724bd58a4983602da6d74dc69f9700e94aa326b0dfa5fbf9?d=identicon)[djunehor](/maintainers/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

[knplabs/gaufrette

PHP library that provides a filesystem abstraction layer

2.5k39.8M123](/packages/knplabs-gaufrette)[google/cloud-storage

Cloud Storage Client for PHP

34390.8M124](/packages/google-cloud-storage)[illuminate/filesystem

The Illuminate Filesystem package.

15261.6M2.6k](/packages/illuminate-filesystem)[superbalist/flysystem-google-storage

Flysystem adapter for Google Cloud Storage

26320.6M30](/packages/superbalist-flysystem-google-storage)[creocoder/yii2-flysystem

The flysystem extension for the Yii framework

2931.7M62](/packages/creocoder-yii2-flysystem)[flowjs/flow-php-server

PHP library for handling chunk uploads. Works with flow.js html5 file uploads.

2451.6M15](/packages/flowjs-flow-php-server)

PHPackages © 2026

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