Laravel Module Generator

v 1.3.*

Rollback / Backups

module:rollback — Manage backups and rollback

Restore generated files to a previous state or manage backup files.

Signature:

php artisan module:rollback
    {--backup= : Specific backup timestamp to rollback to}
    {--list : List available backups}
    {--cleanup : Clean up old backups}

Options:

  • --backup=2024-01-15_143022 — Rollback to specific backup by timestamp
  • --list — Display all available backups
  • --cleanup — Remove old backups (keeps recent ones)

Examples:

# List all backups
php artisan module:rollback --list

# Rollback to most recent backup
php artisan module:rollback

# Rollback to specific backup
php artisan module:rollback --backup=2024-01-15_143022

# Clean up old backups
php artisan module:rollback --cleanup

Note: By default the generator creates backups automatically. Use --skip-backup flag only if you have your own VCS snapshot (Git) and are comfortable restoring changes manually.