Skip to content

feat: add laravel backup#46

Merged
gvieira18 merged 2 commits into1.xfrom
feat/add-laravel-backup
Apr 10, 2026
Merged

feat: add laravel backup#46
gvieira18 merged 2 commits into1.xfrom
feat/add-laravel-backup

Conversation

@gvieira18
Copy link
Copy Markdown
Member

This pull request introduces a comprehensive backup and cleanup system using the Spatie Laravel Backup package, including a custom cleanup strategy, new configuration, and scheduled backup tasks. It also updates several dependencies and adds SFTP support for file storage.

Backup System Integration and Scheduling:

  • Added a new config/backup.php configuration file to enable and customize the Spatie Laravel Backup package, including backup sources, destinations, notifications (mail, Slack, Discord), health checks, and cleanup strategies. A custom SimpleStrategy is introduced for backup cleanup, allowing flexible retention of old backups.
  • Implemented a custom cleanup strategy in SimpleStrategy under app/Tasks/Cleanup/Strategies/SimpleStrategy.php, providing logic to retain a configurable number of old backups.
  • Updated routes/console.php to schedule backup, cleanup, and monitoring commands using Laravel's scheduler, with conditional execution based on configuration. The Cloudflare reload schedule is also adjusted.

Storage and Dependency Enhancements:

  • Added SFTP disk configuration to config/filesystems.php, enabling backups to be stored on remote servers via SFTP with environment-based credentials.
  • Updated composer.json to require spatie/laravel-backup, add SFTP support via league/flysystem-sftp-v3, and bump several package versions for improved compatibility and features.
  • Upgraded several frontend dependencies in package.json for better stability and latest features.

@gvieira18 gvieira18 self-assigned this Apr 10, 2026
@gvieira18 gvieira18 merged commit 7dce1e2 into 1.x Apr 10, 2026
5 checks passed
@gvieira18 gvieira18 deleted the feat/add-laravel-backup branch April 10, 2026 00:57
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant