function backup_migrate_destination_s3_compatible::s3_init in Backup and Migrate S3 7
S3 Init.
4 calls to backup_migrate_destination_s3_compatible::s3_init()
- backup_migrate_destination_s3_compatible::load_file in ./
destinations.s3.inc - Load from the s3 destination.
- backup_migrate_destination_s3_compatible::_delete_file in ./
destinations.s3.inc - Delete from the s3 destination.
- backup_migrate_destination_s3_compatible::_list_files in ./
destinations.s3.inc - List all files from the s3 destination.
- backup_migrate_destination_s3_compatible::_save_file in ./
destinations.s3.inc - Save to to the s3 destination.
File
- ./
destinations.s3.inc, line 90 - Functions to handle the dropbox backup destination.
Class
- backup_migrate_destination_s3_compatible
- A destination for sending database backups to a Dropbox account.
Code
function s3_init() {
// Establish connection with DreamObjects with an S3 client.
$config = array(
'base_url' => $this
->s3_host(),
'key' => $this
->s3_key(),
'secret' => $this
->s3_secret(),
);
if (!empty($this->settings['s3_proxy'])) {
$config['request.options'] = array(
'proxy' => $this->settings['s3_proxy'],
);
}
if (!empty($this->settings['s3_timeout'])) {
$config['curl.options'] = array(
CURLOPT_TIMEOUT => $this->settings['s3_timeout'],
);
}
if (!empty($this->settings['s3_retries'])) {
$config['client.backoff.retries'] = $this->settings['s3_retries'];
}
$this->s3 = S3Client::factory($config);
if ($this->settings['s3_debug']) {
$this->s3
->addSubscriber($this
->s3_debug());
}
}