Server Side

Server Side

Symfony

Current structure of the application is following:

Available commands:

php bin/consosle app:db:process --uid=<Database UID> --db=<Database Name>
php bin/console app:db:getScheduled
php bin/console app:db:log --uuid=<Backup UUID> --status=<Process Status> --message=<Message>
php bin/console app:db:finish --uuid=<Backup UUID> --status=<Process Status> --filename=<backup file name>

php bin/console app:server:generate-keypair
php bin/console app:db:backups:clear

Create new processor

To create new processor need to create new bundle which extends from DbManager_CoreBundle. Need to create service.yaml file:

services:
  db_manager_core.engines.<engine_name>:
    public: true
    class: DbManager\<Engine>Bundle\Service\EngineProcessor
    arguments: []

Where <engine_name> should be changed to engine name. It should be similar to which is specified in the service.

Class DbManager\Bundle\Service\EngineProcessor should implement DbManager\CoreBundle\Interfaces\EngineInterface interface.

Note: Bundle it could be any name of bundle.

Database Configurations

Configurations to databases should be stored under <app_directory>/config/<db_uuid>/config with following formats:

Example for manual dump

Server Configurations

To get access to the service API with server credentials need to fill next params in .env file:

Those params will be used to get JWT token for authentication.

Params could be filled in 2 ways:

  • manually

  • automatically during adding / updating server data, in this case existed data will be overridden by new data

Generating SSL Keys

To get the ability to download DB from a server by client request will be required 2 SSL Keys:

  • public on client side

  • private on server side

To generate keys need to execute the command:

The command will require a key par owner and as a result, will return the generated public key which must be added on the client side.

Required configurations:

On sever side in .env file:

  • SECRET_KEY_PRIVATE=

  • SECRET_KEY_PUBLIC=

On the client side, in .env file:

Removing backups:

Are backups could be deleted in two ways:

  1. manually

  2. automatically via service rules

To delete automatically need to execute the command:

It takes APP_SERVER_UUID and send request to service API Url: api/servers//get_dump_delete_list. The API request will return are list of db files which must be deleted.

Last updated