class SqlSyncCommands extends DrushCommands implements SiteAliasManagerAwareInterface (View source)

Traits

SiteAliasManagerAwareTrait
ProcessManagerAwareTrait
LoggerAwareTrait
IO
ConfigAwareTrait

Constants

REQ

OPT

EXIT_SUCCESS

EXIT_FAILURE

Methods

getConfig()

Replaces same method in ConfigAwareTrait in order to provide a DrushConfig as return type. Helps with IDE completion.

__construct()

No description

LoggerInterface
logger()

Returns a logger object.

io()

Override Robo's IO function with our custom style.

printFile(string $file)

Print the contents of a file.

sqlsync($source, $target, $options = ['no-dump' => false, 'no-sync' => false, 'runner' => self::REQ, 'create-db' => false, 'db-su' => self::REQ, 'db-su-pw' => self::REQ, 'target-dump' => self::REQ, 'source-dump' => self::OPT])

Copy DB data from a source site to a target site. Transfers data via rsync.

validate(CommandData $commandData)

No description

databaseName(SiteAlias $record)

No description

string
dump($options, $global_options, $sourceRecord)

Perform sql-dump on source unless told otherwise.

string
rsync(array $options, SiteAlias $sourceRecord, SiteAlias $targetRecord, $source_dump_path)

No description

import($global_options, $target_dump_path, $targetRecord)

Import file into target.

Details

DrushConfig getConfig()

Replaces same method in ConfigAwareTrait in order to provide a DrushConfig as return type. Helps with IDE completion.

__construct()

protected LoggerInterface logger()

Returns a logger object.

Return Value

LoggerInterface

protected io()

Override Robo's IO function with our custom style.

protected printFile(string $file)

Print the contents of a file.

Parameters

string $file Full path to a file.

sqlsync($source, $target, $options = ['no-dump' => false, 'no-sync' => false, 'runner' => self::REQ, 'create-db' => false, 'db-su' => self::REQ, 'db-su-pw' => self::REQ, 'target-dump' => self::REQ, 'source-dump' => self::OPT])

Copy DB data from a source site to a target site. Transfers data via rsync.

Parameters

$source
$target
$options

Exceptions

Exception

validate(CommandData $commandData)

Parameters

CommandData $commandData

Exceptions

Exception

databaseName(SiteAlias $record)

Parameters

SiteAlias $record

string dump($options, $global_options, $sourceRecord)

Perform sql-dump on source unless told otherwise.

Parameters

$options
$global_options
$sourceRecord

Return Value

string Path to the source dump file.

Exceptions

Exception

string rsync(array $options, SiteAlias $sourceRecord, SiteAlias $targetRecord, $source_dump_path)

Parameters

array $options
SiteAlias $sourceRecord
SiteAlias $targetRecord
$source_dump_path

Return Value

string Path to the target file.

Exceptions

Exception

import($global_options, $target_dump_path, $targetRecord)

Import file into target.

Parameters

$global_options
$target_dump_path
$targetRecord