承接 klytron/laravel-backup-complete-restore 相关项目开发

从需求分析到上线部署,全程专人跟进,保证项目质量与交付效率

邮箱:yvsm@zunyunkeji.com | QQ:316430983 | 微信:yvsm316

klytron/laravel-backup-complete-restore

Composer 安装命令:

composer require 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)

README 文档

README

Latest Version on Packagist Total Downloads License PHP Version

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

  • 🔄 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

Installation

composer require klytron/laravel-backup-complete-restore

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

This package requires Spatie Laravel Backup to be installed and configured in your application.

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

Getting Started

Advanced Usage

🎯 Key Benefits

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

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

Seamless Integration

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

🔧 Configuration

The package automatically registers its configuration. To customize settings:

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

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

Command Description
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

# 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

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

📋 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

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

Development Setup

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

📄 License

The MIT License (MIT). Please see License File for more information.

🙏 Acknowledgments

  • Spatie for the excellent Laravel Backup package
  • WNX for the Laravel Backup Restore package
  • The Laravel community for inspiration and support

📞 Support

Made with ❤️ by Michael K. Laweh

klytron/laravel-backup-complete-restore 适用场景与选型建议

klytron/laravel-backup-complete-restore 是一款 基于 PHP 开发的 Composer 扩展包,目前已累计 10 次下载、GitHub Stars 达 1, 最近一次更新时间为 2025 年 08 月 17 日, 在 PHP 生态内属于活跃度较高的组件。

它主要适用于以下技术方向: 「database」 「files」 「backup」 「laravel」 「restore」 「spatie」 等业务场景。在实际项目中,围绕这些方向常见需要落地的问题包括:接口对接、性能调优、并发安全、与既有框架(Laravel / ThinkPHP / Yii / Webman 等)的兼容适配,以及生产环境的日志埋点与稳定性保障。

我们在过去多个企业项目中使用过 klytron/laravel-backup-complete-restore 或与其功能相近的方案,如果你在选型或落地过程中遇到问题,例如 版本兼容、二次改造、私有化封装、与内部系统对接、生产 BUG 排查,欢迎联系我们协助评估。

围绕 klytron/laravel-backup-complete-restore 我们能提供哪些服务?
定制开发 / 二次开发

基于 klytron/laravel-backup-complete-restore 在你已有业务上做功能扩展、字段裁剪、UI 适配、与内部账号 / 权限 / 日志系统的深度对接。

BUG 修复 & 性能优化

线上偶发问题、内存泄漏、慢查询、并发异常等排查修复;针对高流量场景做缓存、队列、索引层面的调优。

项目外包 & 长期维护

承接完整的项目从需求 → 设计 → 开发 → 上线 → 长期运维;也可按月提供技术保姆服务。

yvsm@zunyunkeji.com QQ:316430983 微信:yvsm316 西安尊云信息科技 · 专注 PHP / Go / 分布式系统研发

统计信息

  • 总下载量: 10
  • 月度下载量: 0
  • 日度下载量: 0
  • 收藏数: 1
  • 点击次数: 29
  • 依赖项目数: 0
  • 推荐数: 0

GitHub 信息

  • Stars: 1
  • Watchers: 0
  • Forks: 0
  • 开发语言: PHP

其他信息

  • 授权协议: MIT
  • 更新时间: 2025-08-17