cleaniquecoders/laravel-config-backup

Backup and restore Laravel configuration (.env and database settings) as a portable AES-256 encrypted archive.
1,281
Install
composer require cleaniquecoders/laravel-config-backup
Latest Version:v1.1.0
PHP:^8.3||^8.4
License:MIT
Last Updated:Aug 17, 2026
Links: GitHub  ·  Packagist
Maintainer: nasrulhazim.m

Laravel Config Backup

Latest Version on Packagist GitHub Tests Action Status Total Downloads

Back up and restore your Laravel application configuration — the .env file and database-stored settings — as a single portable, AES-256 password-encrypted ZIP. Contents are stored decrypted inside the encrypted archive, so on import every encrypted database column is re-encrypted with the destination server's APP_KEY — making a backup taken on one server restorable on another. Every restore takes an automatic pre-restore safety snapshot first.

Config Backup dashboard

Features

  • 🔐 AES-256 password-encrypted archives (the password is never stored)
  • 📦 Two sections: env (the .env file) and database (allowlisted DB-stored settings)
  • 🔁 Portable across servers — DB columns re-encrypted with the destination APP_KEY
  • 🛟 Automatic pre-restore safety snapshot + preview/diff before restoring
  • 🧹 Retention pruning, optional scheduler, mail notifications
  • 🖥️ Artisan commands and an optional Livewire + Flux UI

Installation

composer require cleaniquecoders/laravel-config-backup
php artisan vendor:publish --tag="laravel-config-backup-migrations"
php artisan vendor:publish --tag="laravel-config-backup-config"
php artisan migrate

Store archives on a private disk. They contain every secret — the ZIP encryption is a second layer, not a licence to expose them.

Quick Start

# Create a backup (prompts for the encryption password securely)
php artisan config-backup:create --sections=env,database --notes="before upgrade"

# List, preview a restore, then restore
php artisan config-backup:list
php artisan config-backup:restore {uuid} --dry-run
php artisan config-backup:restore {uuid}
use CleaniqueCoders\ConfigBackup\Facades\ConfigBackup;

$backup = ConfigBackup::create(['env', 'database'], 'a-strong-password');
$result = ConfigBackup::restore($absPath, 'a-strong-password', ['env', 'database']);

Documentation

Full reference lives in docs/:

  • Getting Started — installation & configuration
  • Usage — CLI, programmatic, and the web UI
  • Configuration — config keys, database allowlist, scheduling & notifications
  • Guides — authorization, APP_KEY portability, local development

Testing

composer test

Changelog

Please see CHANGELOG for more information on what has changed recently.

Contributing

Please see CONTRIBUTING for details.

Security Vulnerabilities

Please review our security policy on how to report security vulnerabilities.

Credits

License

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

Related Packages

h2akim/backupl41

An easy way backup and restore databases in Laravel.

17 1
cornford/backup

An easy way backup and restore databases in Laravel.

25,733 40
torann/registry

Laravel registry manager for application configurations

2,056 22
buzz/laravel-setting

Package changes config for laravel 5.*

1,098 1