PHP code example of richardhj / contao-backup-manager

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

    

richardhj / contao-backup-manager example snippets


>    public function configureFilesystem(FilesystemConfiguration $config): void
>    {
>        $config
>            ->mountAdapter('sftp', [
>                'host' => '%env(DB_STORAGE_HOST)%',
>                'port' => 22,
>                'username' => '%env(DB_STORAGE_USERNAME)%',
>                'password' => '%env(DB_STORAGE_PASSWORD)%',
>                'root' => '/db',
>                'timeout' => 10,
>            ], 'backups', 'backups')
>        ;
>    }
>  
shell script
php vendor/bin/contao-console backup-manager:backup contao hetzner_enc -c gzip