PHP code example of jiannius / backup

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

    

jiannius / backup example snippets


'database' => [
    'connection' => null,           // null = the app's default connection
    'binary_path' => null,          // dir containing mysqldump/pg_dump/sqlite3, null = PATH
],

'files' => [
    '  ],
],

Schedule::command('backup:run')->daily();

$filename = backup()->run();                  // full backup
$filename = backup()->run(database: false);   // files only

backup()->list();      // download URLs use the configured expiry (default 24h)
backup()->list(60);    // override: URLs valid for 60 minutes
bash
php artisan vendor:publish --tag=backup-config