protected function resolveDatabaseImportCommand($service = null)
    {
        /** @var ServiceDbInterface $instance */
        $instance = $this->resolveDatabaseServiceInstance($service);

        /** @var DatabaseInterface $database */
        $database = $this->getDatabaseInfo($instance);

        switch ($database->getProtocol()) {
            case 'mysql':
                return (new MysqlCommand())
                    ->host($database->getHostname())
                    ->username($database->getUser())
                    ->password($database->getPassword())
                    ->database($database->getDatabase());
            case 'pgsql':
                return (new PgsqlCommand())
                    ->host($database->getHostname())
                    ->username($database->getUser())
                    ->password($database->getPassword())
                    ->database($database->getDatabase());
        }
    }