PHPackages                             microcode/filament-database-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. microcode/filament-database-backup

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

microcode/filament-database-backup
==================================

Filament plugin for database backup, restore, scheduling, and optional S3 storage.

v1.0.0(today)02↑2900%MITPHPPHP ^8.4

Since Aug 28Pushed todayCompare

[ Source](https://github.com/vitkonovaluck/filament-database-backup)[ Packagist](https://packagist.org/packages/microcode/filament-database-backup)[ Docs](https://github.com/vitkonovaluck/filament-database-backup)[ RSS](/packages/microcode-filament-database-backup/feed)WikiDiscussions main Synced today

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

Filament Database Backup
========================

[](#filament-database-backup)

Laravel 12 / 13 + Filament 4 / 5 plugin for **database** backup, restore, and scheduling.

Supports **MySQL / MariaDB / PostgreSQL** via CLI tools (`mysqldump` / `mysql`, `pg_dump` / `psql`).

Package: `microcode/filament-database-backup`
Namespace: `Microcode\FilamentDatabaseBackup`

**Not supported:** SQLite, application file backups, Spatie Backup.

Install
-------

[](#install)

```
composer require microcode/filament-database-backup
php artisan vendor:publish --tag="filament-database-backup-config"
php artisan vendor:publish --tag="filament-database-backup-migrations"
php artisan migrate
```

This package requires [`microcode/filament-integrations`](https://packagist.org/packages/microcode/filament-integrations). Register both plugins on the Filament panel. Enable the `aws` driver if you want backups stored on S3.

```
use Microcode\FilamentDatabaseBackup\FilamentDatabaseBackupPlugin;
use Microcode\FilamentIntegrations\IntegrationsPlugin;

public function panel(Panel $panel): Panel
{
    return $panel
        ->plugin(
            IntegrationsPlugin::make()
                ->navigationGroup('Settings')
                ->canAccessSettings(fn (): bool => true)
                ->only(['aws'])
        )
        ->plugin(
            FilamentDatabaseBackupPlugin::make()
                ->authorize(fn (): bool => auth()->user()?->can('manage-backups') ?? false)
                ->navigationGroup('Settings')
                ->navigationSort(30)
                ->retentionDays(30)
                // ->cluster(SomeCluster::class)
                // ->queue('backups')
        );
}
```

Authorization is injected via `->authorize(...)`. Navigation group / icon / sort / cluster are configurable on the plugin. No host roles or clusters are hardcoded.

Filesystem disk
---------------

[](#filesystem-disk)

Add a private local disk (e.g. in `config/filesystems.php`). Dumps always start here; when AWS is configured this disk keeps **only the latest** `.sql` file.

```
'backups' => [
    'driver' => 'local',
    'root' => storage_path('app/backups'),
    'visibility' => 'private',
    'throw' => false,
],
```

Config key `database-backup.disk` defaults to `backups`.

S3 storage
----------

[](#s3-storage)

When the Integrations AWS driver has `access_key_id`, `secret_access_key`, `region`, and `bucket`:

- the dump is uploaded to the Laravel S3 disk (default name `s3`, or `FILAMENT_INTEGRATIONS_AWS_DISK` / `DATABASE_BACKUP_S3_DISK`);
- the catalog row stores that remote disk;
- older dumps live on S3 until retention deletes them;
- locally only the newest file remains.

Host requirements:

1. Enable `aws` on `IntegrationsPlugin` and save credentials in the Integrations UI.
2. Define an S3 disk stub in `config/filesystems.php` (`driver => s3`).
3. Install `league/flysystem-aws-s3-v3`.

Set `DATABASE_BACKUP_S3_ENABLED=false` to force local-only storage.

Retention
---------

[](#retention)

Global default (manual backups and S3 copies):

```
FilamentDatabaseBackupPlugin::make()->retentionDays(30)
```

If omitted, `config('database-backup.default_retention_days')` is used (env `DATABASE_BACKUP_DEFAULT_RETENTION_DAYS`). Each schedule can override this for its own backups.

Cleanup runs after every successful backup and from `database-backup:run-scheduled`.

Queue worker
------------

[](#queue-worker)

All create / restore / run-now work is queued.

```
php artisan queue:work --queue=backups --tries=1 --timeout=600
```

Scheduler
---------

[](#scheduler)

In `routes/console.php` (or the host scheduler):

```
use Illuminate\Support\Facades\Schedule;

Schedule::command('database-backup:run-scheduled')->everyMinute();
```

Command options:

- `--force` — run all active schedules
- `--schedule=` — run one schedule by ID (forced)

Environment / config
--------------------

[](#environment--config)

Published file: `config/database-backup.php`

KeyPurpose`disk`Local filesystem disk name`path_prefix`Folder under disk (default: slug of `app.name`)`s3.enabled` / `s3.disk`Use S3 when AWS is configured; optional disk name override`queue` / `job_timeout`Queue name and job timeout`process_timeout_seconds`CLI process timeout`mysqldump_path` / `mysql_path` / `mysqldump_flags`MySQL tools`pg_dump_path` / `psql_path` / `pg_dump_flags`PostgreSQL tools`default_retention_days` / `retention_days_min` / `retention_days_max`Retention window`tables.backups` / `tables.backup_schedules`Table name overridesPasswords are passed only via `MYSQL_PWD` / `PGPASSWORD` process env — never on argv or in logs.

Features
--------

[](#features)

1. Manual backup (queued dump → `.sql` on disk or S3 + catalog row)
2. Restore with confirmation (queued; local cache or S3 download; **ALL CURRENT DATA WILL BE LOST**)
3. Catalog sync from `{path_prefix}/*.sql` on the canonical disk
4. Secure download route `database-backup.download` (authorize + path checks)
5. Schedules: hourly / daily, optional per-schedule retention override
6. Artisan `database-backup:run-scheduled`

Testing
-------

[](#testing)

```
composer install
vendor/bin/phpunit
vendor/bin/pint
```

Package tests use an in-memory SQLite connection for the **catalog** tables only. Dump/restore CLI paths are covered with callbacks / unit mapping tests — no real `mysqldump` is required.

License
-------

[](#license)

MIT

###  Health Score

41

—

FairBetter than 87% of packages

Maintenance100

Actively maintained with recent releases

Popularity3

Limited adoption so far

Community2

Small or concentrated contributor base

Maturity50

Maturing project, gaining track record

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

0d ago

### Community

Maintainers

![](https://avatars.githubusercontent.com/u/99759717?v=4)[vitkonovaluck](/maintainers/vitkonovaluck)[@vitkonovaluck](https://github.com/vitkonovaluck)

---

Tags

laravels3databasebackupmysqldumpfilamentpg\_dump

###  Code Quality

TestsPHPUnit

Code StyleLaravel Pint

### Embed Badge

![Health badge](/badges/microcode-filament-database-backup/health.svg)

```
[![Health](https://phpackages.com/badges/microcode-filament-database-backup/health.svg)](https://phpackages.com/packages/microcode-filament-database-backup)
```

###  Alternatives

[rawilk/profile-filament-plugin

Profile &amp; MFA starter kit for filament.

3915.5k](/packages/rawilk-profile-filament-plugin)[tallstackui/tallstackui

TallStackUI is a powerful suite of Blade components that elevate your workflow of Livewire applications.

731189.9k16](/packages/tallstackui-tallstackui)[defstudio/telegraph

A laravel facade to interact with Telegram Bots

818355.4k3](/packages/defstudio-telegraph)[harris21/laravel-fuse

Circuit breaker for Laravel queue jobs. Protect your workers from cascading failures.

46273.9k](/packages/harris21-laravel-fuse)[finity-labs/fin-mail

A powerful email template manager and composer for Filament with dynamic token replacement, template versioning, and inline email sending.

316.8k2](/packages/finity-labs-fin-mail)[simplestats-io/laravel-client

Server-side analytics for Laravel that follows the full funnel from visit to registration to payment, attributed to the channel that drove it. Revenue, MRR, churn and ad-spend profit (ROAS/CAC) per channel. GDPR compliant, ad-blocker proof.

5226.7k](/packages/simplestats-io-laravel-client)

PHPackages © 2026

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