PHP code example of wertmenschen / backup

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

    

wertmenschen / backup example snippets

 php
// config/filesystems.php

'disks' => [
    'webdav' => [
        'driver'   => 'webdav',
        'baseUri'  => env('BACKUP_URL'),
        'userName' => env('BACKUP_USERNAME'),
        'password' => env('BACKUP_PASSWORD'),
    ],
];
shell
php artisan vendor:publish --provider="Wertmenschen\Backup\BackupServiceProvider"
 php
// app/Console/Kernel.php

protected function schedule(Schedule $schedule)
{
   $schedule->command('backup:clean')->daily()->at('01:00');
   $schedule->command('backup:run')->daily()->at('02:00');
   $schedule->command('backup:run --only-db')->hourly();
   
   $schedule->command('backup:clean')->dailyAt(4);
   $schedule->command('backup:monitor')->dailyAt(5);
}