Add New Dump Method

To add new dump method need to create new service which implements App\Service\Methods\MethodInterface and implement all required methods. After service is ready it should be passed to App\Service\Methods\MethodProcessor service via tag app.backup_method like:

 DbManager\MysqlBundle\Service\Methods\MysqldumpOverSsh:
    autowire: true
    tags:
      - { name: 'app.backup_method' }

1. Specify name and description of the method

First of all need to specify name and description of method like:


    public function getCode(): string
    {
        return 'aws-s3';
    }

    public function getDescription(): string
    {
        return 'AWS S3';
    }

2. Second step is to configure prompts to ask all required configs:

3. Configure validator

Third step is to configure validator (you can skip it and return always true if you don't need additional validation). Example with AWS S3 below:

So basically in validation need to ensure file exists and connection is OK.

4. Configure dump creation

Last step is to configure backuping of database. Example:

Here method execute accepts configurations, DB UUID and filename. This method should return full path to backup file;

Last updated