PHP code example of arham-solcoders / backupguard

1. Go to this page and download the library: Download arham-solcoders/backupguard 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/ */

    

arham-solcoders / backupguard example snippets


return [
    'enabled' => true,
    'backup_path' => storage_path('app/db-backups'),
    'connections' => [], // empty = auto-detect all supported SQL connections
    'retention_days' => 3,
    'compress' => false,
    'timeout_seconds' => 300,
];

protected function schedule(Schedule $schedule): void
{
    $schedule->command('db-backup:run')->daily();
}
bash
php artisan vendor:publish --tag=laravel-db-backup-config
bash
php artisan db-backup:run