PHP code example of putuwahyu29 / backup-bridge

1. Go to this page and download the library: Download putuwahyu29/backup-bridge library. Choose the download type require.

2. Extract the ZIP file and open the index.php.

3. Add this code to the index.php.
    
        
<?php
require_once('vendor/autoload.php');

/* Start to develop here. Best regards https://php-download.com/ */

    

putuwahyu29 / backup-bridge example snippets


'dashboard' => [
    'enabled' => env('APP_BACKUP_DASHBOARD_ENABLED', true),
    'prefix' => env('APP_BACKUP_DASHBOARD_PREFIX', 'admin/backups'),
    'middleware' => ['web', 'auth'], // Add your application auth middleware
],

use Illuminate\Support\Facades\Schedule;

// Run database backup daily at 02:00 AM
Schedule::command('app-backup:run database --fresh')->dailyAt('02:00');

// Run attachments backup weekly on Sunday at 03:00 AM
Schedule::command('app-backup:run attachments --fresh')->weeklyOn(0, '03:00');

protected function schedule(Schedule $schedule): void
{
    $schedule->command('app-backup:run database --fresh')->dailyAt('02:00');
    $schedule->command('app-backup:run attachments --fresh')->weekly();
}
bash
php artisan app-backup:install