PHPackages                             klytron/laravel-backup-complete-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. [Database &amp; ORM](/categories/database)
4. /
5. klytron/laravel-backup-complete-restore

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

klytron/laravel-backup-complete-restore
=======================================

Complete backup restoration for Spatie Laravel Backup - restores both database and files to their exact locations with consolidated configuration and internal health checks (supports Laravel 10-13)

v1.6.1(1mo ago)110MITPHPPHP ^8.1|^8.2|^8.3|^8.4CI failing

Since Jul 29Pushed 1mo agoCompare

[ Source](https://github.com/klytron/laravel-backup-complete-restore)[ Packagist](https://packagist.org/packages/klytron/laravel-backup-complete-restore)[ Docs](https://github.com/klytron/laravel-backup-complete-restore)[ Fund](https://www.klytron.com/buy-me-a-coffee)[ RSS](/packages/klytron-laravel-backup-complete-restore/feed)WikiDiscussions main Synced 1mo ago

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

Laravel Backup Complete Restore
===============================

[](#laravel-backup-complete-restore)

[![Latest Version on Packagist](https://camo.githubusercontent.com/386f3cfa46388e5a854bb58c3c466ad9e75748ae193badcb1c2faa543a0eaaf4/68747470733a2f2f696d672e736869656c64732e696f2f7061636b61676973742f762f6b6c7974726f6e2f6c61726176656c2d6261636b75702d636f6d706c6574652d726573746f72652e737667)](https://packagist.org/packages/klytron/laravel-backup-complete-restore)[![Total Downloads](https://camo.githubusercontent.com/4290b474fcb8d438a2a7d33e59b6d194ef482b133695822243d431f390df1ea3/68747470733a2f2f696d672e736869656c64732e696f2f7061636b61676973742f64742f6b6c7974726f6e2f6c61726176656c2d6261636b75702d636f6d706c6574652d726573746f72652e737667)](https://packagist.org/packages/klytron/laravel-backup-complete-restore)[![License](https://camo.githubusercontent.com/248f294aa1904c35ef40c39560cbf78c3b43c01d022165dd078b9974bf6f9070/68747470733a2f2f696d672e736869656c64732e696f2f7061636b61676973742f6c2f6b6c7974726f6e2f6c61726176656c2d6261636b75702d636f6d706c6574652d726573746f72652e737667)](https://packagist.org/packages/klytron/laravel-backup-complete-restore)[![PHP Version](https://camo.githubusercontent.com/ef03f1b274257ac246fc744aae0e709f36789bb284a2c1219a8793053f33ab5e/68747470733a2f2f696d672e736869656c64732e696f2f7061636b61676973742f7068702d762f6b6c7974726f6e2f6c61726176656c2d6261636b75702d636f6d706c6574652d726573746f72652e737667)](https://packagist.org/packages/klytron/laravel-backup-complete-restore)

A comprehensive Laravel package for complete backup restoration, including both database and file restoration from **Spatie Laravel Backup** archives with consolidated configuration and internal health checks.

✨ Features
----------

[](#-features)

- 🔄 **Complete Restoration**: Restore both database and files from Spatie Laravel Backup archives
- 🎯 **Consolidated Configuration**: Single configuration file that leverages existing Laravel config
- 🛡️ **Internal Health Checks**: Self-contained health check classes extending dependency packages
- 🔧 **Config System Integration**: Automatic compatibility with `wnx/laravel-backup-restore`
- 📁 **Smart File Mappings**: Intelligent mapping of container paths to local filesystem
- 🚀 **Multiple Storage Support**: Works with local, S3, Google Drive, and other storage disks
- 🔒 **Safety Features**: Backup existing files, confirmation prompts, and error handling
- 📊 **Progress Tracking**: Real-time progress indicators and detailed logging
- 🎨 **Beautiful CLI**: Colorful, emoji-rich command-line interface

🚀 Quick Start
-------------

[](#-quick-start)

### Installation

[](#installation)

```
composer require klytron/laravel-backup-complete-restore
```

### Basic Usage

[](#basic-usage)

```
# List available backups
php artisan backup:restore-complete --list

# Restore complete backup (interactive)
php artisan backup:restore-complete

# Restore specific backup
php artisan backup:restore-complete --backup="2024-01-15-10-30-00.zip"

# Restore database only
php artisan backup:restore-complete --database-only

# Restore files only
php artisan backup:restore-complete --files-only
```

📋 Prerequisites
---------------

[](#-prerequisites)

This package requires [Spatie Laravel Backup](https://github.com/spatie/laravel-backup) to be installed and configured in your application.

### Required Dependencies

[](#required-dependencies)

- **PHP**: 8.1 or higher
- **Laravel**: 10.0, 11.0, 12.0, or 13.0
- **Spatie Laravel Backup**: 8.0 or higher
- **WNX Laravel Backup Restore**: 1.6 or higher

📚 Documentation
---------------

[](#-documentation)

### Getting Started

[](#getting-started)

- [📖 Installation Guide](docs/installation.md) - Complete setup and configuration
- [⚙️ Configuration Guide](docs/configuration.md) - Package configuration options
- [🔧 Commands Guide](docs/commands.md) - Available Artisan commands and options

### Advanced Usage

[](#advanced-usage)

- [🛡️ Health Checks](docs/health-checks.md) - Built-in and custom health checks
- [📁 File Mappings](docs/file-mappings.md) - Understanding and configuring file mappings
- [🔍 Troubleshooting](docs/troubleshooting.md) - Common issues and solutions

🎯 Key Benefits
--------------

[](#-key-benefits)

### Consolidated Configuration

[](#consolidated-configuration)

Instead of multiple configuration files, this package uses a single `config/backup-complete-restore.php` file that leverages your existing Laravel configuration (`config/database.php`, `config/filesystems.php`, `config/backup.php`).

### Internal Health Checks

[](#internal-health-checks)

Self-contained health check classes that extend dependency packages, making the package more maintainable and reducing direct external dependencies.

### Seamless Integration

[](#seamless-integration)

Automatic compatibility with `wnx/laravel-backup-restore` through config system integration - no physical files needed.

🔧 Configuration
---------------

[](#-configuration)

The package automatically registers its configuration. To customize settings:

```
php artisan vendor:publish --provider="Klytron\LaravelBackupCompleteRestore\BackupCompleteRestoreServiceProvider"
```

### Basic Configuration

[](#basic-configuration)

```
// config/backup-complete-restore.php
return [
    'file_mappings' => [
        'var/www/html/storage/app/public' => storage_path('app/public'),
        'var/www/html/public' => public_path(),
        'var/www/html/app' => base_path('app'),
    ],

    'health_checks' => [
        \Klytron\LaravelBackupCompleteRestore\HealthChecks\Checks\DatabaseHasTables::class,
        \Klytron\LaravelBackupCompleteRestore\HealthChecks\Checks\FilesExist::class => [
            'files' => [
                storage_path('app/public'),
                storage_path('logs'),
            ],
        ],
    ],
];
```

🛠️ Available Commands
---------------------

[](#️-available-commands)

CommandDescription`backup:restore-complete`Complete backup restoration (database + files)`backup:health-check`Run health checks on restored backup`klytron:backup-health-check`Run custom health checks### Command Options

[](#command-options)

```
# List backups
php artisan backup:restore-complete --list

# Selective restoration
php artisan backup:restore-complete --database-only
php artisan backup:restore-complete --files-only

# Backup selection
php artisan backup:restore-complete --backup="filename.zip"
php artisan backup:restore-complete --disk="s3"

# Database options
php artisan backup:restore-complete --connection="mysql"
php artisan backup:restore-complete --reset

# Safety options
php artisan backup:restore-complete --force
php artisan backup:restore-complete --verbose
```

🔄 Integration with Spatie Laravel Backup
----------------------------------------

[](#-integration-with-spatie-laravel-backup)

This package is designed to work seamlessly with Spatie Laravel Backup:

1. **Spatie creates backups** → This package restores them
2. **Same configuration** → Uses your existing Spatie backup configuration
3. **Same storage disks** → Works with all configured storage disks
4. **Same file structure** → Understands Spatie's backup archive format

🎨 Example Output
----------------

[](#-example-output)

```
📋 Available Backups

Disk: local
├── 2024-01-15-10-30-00.zip (15.2 MB)
├── 2024-01-15-09-15-00.zip (14.8 MB)
└── 2024-01-14-23-45-00.zip (14.9 MB)

🔄 Starting complete restoration...

📦 Extracting backup archive...
   [████████████████████] 100%

🗄️  Restoring database...
   [████████████████████] 100%

📁 Restoring files...
   [████████████████████] 100%

✅ Restoration completed successfully!

🔍 Running health checks...
   ✅ Database has tables
   ✅ Critical files exist
   ✅ File integrity verified

🎉 Complete restoration finished successfully!

```

🤝 Contributing
--------------

[](#-contributing)

Contributions are welcome! Please feel free to submit a Pull Request.

### Development Setup

[](#development-setup)

1. Fork the repository
2. Create a feature branch
3. Make your changes
4. Add tests
5. Submit a pull request

📄 License
---------

[](#-license)

The MIT License (MIT). Please see [License File](LICENSE.md) for more information.

🙏 Acknowledgments
-----------------

[](#-acknowledgments)

- [Spatie](https://spatie.be/) for the excellent Laravel Backup package
- [WNX](https://github.com/wnx) for the Laravel Backup Restore package
- The Laravel community for inspiration and support

📞 Support
---------

[](#-support)

- 📧 **Email**:
- 🌐 **Website**:
- ☕ **Support the project**:
- 🐛 **Issues**: [GitHub Issues](https://github.com/klytron/laravel-backup-complete-restore/issues)

---

**Made with ❤️ by [Michael K. Laweh](https://www.klytron.com)**

###  Health Score

44

—

FairBetter than 92% of packages

Maintenance92

Actively maintained with recent releases

Popularity7

Limited adoption so far

Community6

Small or concentrated contributor base

Maturity59

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

Every ~35 days

Recently: every ~60 days

Total

8

Last Release

41d ago

### Community

Maintainers

![](https://www.gravatar.com/avatar/4c696458a29585d45beb5ed8f0cb22e23a2698dad1f9f0515d66de5934d2ae79?d=identicon)[klytron](/maintainers/klytron)

---

Top Contributors

[![klytron](https://avatars.githubusercontent.com/u/11487236?v=4)](https://github.com/klytron "klytron (2 commits)")

---

Tags

spatielaraveldatabasebackupfilesrestorehealth-checkscomplete-restoreconsolidated-config

###  Code Quality

TestsPHPUnit

### Embed Badge

![Health badge](/badges/klytron-laravel-backup-complete-restore/health.svg)

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

###  Alternatives

[spatie/laravel-backup

A Laravel package to backup your application

6.0k21.8M191](/packages/spatie-laravel-backup)[cybercog/laravel-clickhouse

ClickHouse migrations for Laravel

163166.8k](/packages/cybercog-laravel-clickhouse)[toponepercent/baum

Baum is an implementation of the Nested Set pattern for Eloquent models.

3154.7k](/packages/toponepercent-baum)[cornford/backup

An easy way backup and restore databases in Laravel.

4225.6k](/packages/cornford-backup)[sarfraznawaz2005/backupmanager

laravel package to backup/restore files and database.

313.7k](/packages/sarfraznawaz2005-backupmanager)

PHPackages © 2026

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