Skip to content

Database Backup Recovery

This system uses Laravel Backup Restore to restore database backups from S3.

Configuration

The restore command uses these environment variables:

  • BACKUP_DISK - The filesystem disk where backups are stored (default: s3-backup)
  • BACKUP_ARCHIVE_PASSWORD - Password to decrypt the backup archive
  • AWS_KEY_BACKUP / AWS_SECRET_BACKUP - AWS credentials for S3 access

Recovery Steps

From the Server

Log into the server and navigate to the application folder:

bash
php artisan backup:restore

From Local Machine (Docker)

Run the Makefile command:

bash
make db:update:full

This runs an interactive restore process that will:

  1. Fetch the list of available backups from S3
  2. Prompt you to select which backup to restore
  3. Download and decrypt the backup
  4. Import the database dump