cleaniquecoders/laravel-config-backup

Backup and restore Laravel configuration (.env and database settings) as a portable AES-256 encrypted archive.

Maintainers

Package info

github.com/cleaniquecoders/laravel-config-backup

pkg:composer/cleaniquecoders/laravel-config-backup

Fund package maintenance!

Cleanique Coders

Statistics

Installs: 3

Dependents: 0

Suggesters: 0

Stars: 0

Open Issues: 0

v1.1.0 2026-06-09 04:32 UTC

This package is auto-updated.

Last update: 2026-06-09 04:33:30 UTC


README

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.