PHP code example of sprint-digital / sprint-backup

1. Go to this page and download the library: Download sprint-digital/sprint-backup 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/ */

    

sprint-digital / sprint-backup example snippets


's3-backup' => [
    'driver' => 's3',
    'key' => env('BACKUP_AWS_ACCESS_KEY_ID'),
    'secret' => env('BACKUP_AWS_SECRET_ACCESS_KEY'),
    'region' => env('BACKUP_AWS_DEFAULT_REGION'),
    'bucket' => env('BACKUP_AWS_BUCKET'),
    'url' => env('BACKUP_AWS_URL') . '/' . env('BACKUP_AWS_PATH'),
    'endpoint' => env('BACKUP_AWS_ENDPOINT'),
    'use_path_style_endpoint' => env('BACKUP_AWS_USE_PATH_STYLE_ENDPOINT', false),
    'throw' => false,
],
bash
php artisan backup:install
bash
php artisan backup:restore
# or auto run the last backup
php artisan backup:restore --last-backup