PHPackages                             bsaqqa/backfire - 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. [CLI &amp; Console](/categories/cli)
4. /
5. bsaqqa/backfire

ActiveLibrary[CLI &amp; Console](/categories/cli)

bsaqqa/backfire
===============

Is a backup Database CLI for PHP

1.0.0(3y ago)518MITPHPPHP &gt;=8.0

Since Jan 10Pushed 3y ago1 watchersCompare

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

READMEChangelog (1)Dependencies (2)Versions (2)Used By (0)

Backfire
========

[](#backfire)

PHP CLI For Auto Backup DB.

You can run it as a cron job on Windows/Ubuntu servers to do daily backup of your database.

Features
========

[](#features)

- Easy to install and configure
- Can be run as a cron job on Windows and Ubuntu servers
- Create it as a composer package
- Supports multiple database servers (Multiple connections)
- Supports different database engines (Coming Soon)
- Supports automatic restoration of backups (Coming Soon)
- Supports email notifications (Coming Soon)
- Supports OneDrive integration (Coming soon)
- Supports cloud storage (Coming Soon)
- Supports encryption of backups (Coming Soon)

Roadmap
=======

[](#roadmap)

I plan to continue developing and enhancing the **Backfire** in the future. Below is a list of features I plan to add in the future:

- Easy to install and configure
- Can be run as a cron job on Windows and Ubuntu servers Customizable backup frequency and destination
- Create it as a composer package: Currently, Backfire is not available as a composer package. In the future, I plan to create it as a composer package to make it easier for users to install and use Backfire.
- Implement support for multiple database servers: Currently, Backfire only supports backing up databases on a single server. In the future, I plan to add support for backing up databases on multiple servers.
- Add support for different database engines: The script currently only supports MySQL databases. In the future, I plan to add support for other database engines such as PostgreSQL and SQL Server.
- Improve error handling: I plan to improve Backfire's error handling to make it more robust and user-friendly.
- Add support for automatic restoration of backups: Currently, Backfire only supports creating backups. In the future, I plan to add support for automatically restoring backups in case of data loss.
- Add support for email notifications: I plan to add the ability to send email notifications to users when a backup is created or when an error occurs.
- Improve documentation and examples: I plan to improve the documentation and examples provided in the repository to make it easier for users to get started with Backfire.
- Add support for cloud storage: Currently, Backfire only supports saving backups to a local folder. In the future, I plan to add support for other cloud storage providers such as OneDrive, Google Drive and Dropbox.
- Add support for encryption of backups: I plan to add the ability to encrypt backups to protect sensitive data. This roadmap represents our current plans for the development of the **Backfire**, but it is subject to change as I receive feedback and suggestions from users.

I welcome any feedback or ideas you have for improving Backfire, and I look forward to continuing to develop and enhance it in the future.

Getting Started
===============

[](#getting-started)

These instructions will get you a copy of the project up and running on your local machine for development and testing purposes.

1.1 Prerequisites
-----------------

[](#11-prerequisites)

You need to have PHP &gt;=8.0 and [Composer](https://getcomposer.org/) installed on your machine.

1.2 Installing
--------------

[](#12-installing)

1. Run install command

```
  composer global require bsaqqa/backfire
```

2. Run install command to install package dependencies and initialize it

```
  backfire install
```

3. Open `~/.backfire/backfire.config.php` file or using below command to edit it with your database credentials

```
  backfire open-config
```

4. Edit the following variables to match your DB information and backup folder path:

```
"connections" => [
  "default" => [ // connection name that will be used in the command line to select the connection (you can add more than one connection)
      'type' => 'mysql', // in the future we will support more types
      'host' => 'localhost',
      'port' => 3306,
      'username' => 'root',
      'password' => '',
      'database' => 'backfire',
  ],
  // ... more connections -> You can add more connections
],
 /**
     * Storage config
     *
     */
    "storage" => [
        //...,
        'path' => 'storage/backups', // relative to the user home directory
    ],
```

1.3 How to use
--------------

[](#13-how-to-use)

You can run it with below command:

```
  backfire backup
```

1.4 How to setup cron job on Windows
------------------------------------

[](#14-how-to-setup-cron-job-on-windows)

[![image](https://user-images.githubusercontent.com/21352835/211493648-121ecdf5-02f9-4ffd-a344-94ba80f7d452.png)](https://user-images.githubusercontent.com/21352835/211493648-121ecdf5-02f9-4ffd-a344-94ba80f7d452.png)

You can setup cron job on Windows using schedule with below steps:

1. Open Task Scheduler
2. Click Create a Basic Task
3. Enter a name for the task
4. Select "Run whether user is logged on or not"
5. Check "Run with highest privileges"
6. Click on "Triggers"
7. Click New
8. Select "Daily"
9. Click OK
10. Click on "Actions"
11. Click New
12. Select "Start a program"
13. Enter the path to "`backfire.bat`" in the field
14. Enter `backup` argument in the "Add arguments" field
15. Click OK

1.5 How to setup cron job on Ubuntu
-----------------------------------

[](#15-how-to-setup-cron-job-on-ubuntu)

You can setup cron job on Ubuntu using crontab with below steps:

1. Open terminal
2. Run crontab

    ```
     crontab -e

    ```
3. Add the following line to the end of the file:

    ```
     0 0 * * * backfire backup

    ```
4. Save and exit

License
=======

[](#license)

This project is licensed under the MIT License - see the [LICENSE.md](LICENSE.md) file for details

###  Health Score

24

—

LowBetter than 32% of packages

Maintenance20

Infrequent updates — may be unmaintained

Popularity11

Limited adoption so far

Community7

Small or concentrated contributor base

Maturity50

Maturing project, gaining track record

 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.

###  Release Activity

Cadence

Unknown

Total

1

Last Release

1224d ago

### Community

Maintainers

![](https://www.gravatar.com/avatar/0bf910fe500f0ba1472ed7a5c3c254c33e49f4c94b85f62b464b8db61edfb7ba?d=identicon)[bsaqqa](/maintainers/bsaqqa)

---

Top Contributors

[![bsaqqa](https://avatars.githubusercontent.com/u/21352835?v=4)](https://github.com/bsaqqa "bsaqqa (28 commits)")

### Embed Badge

![Health badge](/badges/bsaqqa-backfire/health.svg)

```
[![Health](https://phpackages.com/badges/bsaqqa-backfire/health.svg)](https://phpackages.com/packages/bsaqqa-backfire)
```

###  Alternatives

[wp-cli/wp-cli

WP-CLI framework

5.1k17.2M320](/packages/wp-cli-wp-cli)[consolidation/annotated-command

Initialize Symfony Console commands from annotated command class methods.

22569.8M19](/packages/consolidation-annotated-command)[seld/cli-prompt

Allows you to prompt for user input on the command line, and optionally hide the characters they type

24725.8M17](/packages/seld-cli-prompt)[illuminate/console

The Illuminate Console package.

12944.1M5.1k](/packages/illuminate-console)[php-tui/php-tui

Comprehensive TUI library heavily influenced by Ratatui

589747.0k6](/packages/php-tui-php-tui)[codedungeon/php-cli-colors

Liven up you PHP Console Apps with standard colors

10210.1M26](/packages/codedungeon-php-cli-colors)

PHPackages © 2026

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