function backup_migrate_destination_s3::_save_file in Backup and Migrate 7.2
Same name and namespace in other branches
- 8.2 includes/destinations.s3.inc \backup_migrate_destination_s3::_save_file()
- 8.3 includes/destinations.s3.inc \backup_migrate_destination_s3::_save_file()
- 6.3 includes/destinations.s3.inc \backup_migrate_destination_s3::_save_file()
- 6.2 includes/destinations.s3.inc \backup_migrate_destination_s3::_save_file()
- 7.3 includes/destinations.s3.inc \backup_migrate_destination_s3::_save_file()
Save to to the s3 destination.
Overrides backup_migrate_destination::_save_file
File
- includes/
destinations.s3.inc, line 23 - Functions to handle the s3 backup destination.
Class
- backup_migrate_destination_s3
- A destination for sending database backups to an s3 server.
Code
function _save_file($file, $settings) {
if ($s3 = $this
->s3_object()) {
$path = $file
->filename();
if ($s3
->putObject($s3
->inputFile($file
->filepath(), FALSE), $this
->get_bucket(), $this
->remote_path($file
->filename()), S3::ACL_PRIVATE)) {
return $file;
}
}
return FALSE;
}