function backup_migrate_destination_filesource::_backup_to_file_php in Backup and Migrate 8.3
Same name and namespace in other branches
- 6.3 includes/sources.filesource.inc \backup_migrate_destination_filesource::_backup_to_file_php()
- 7.3 includes/sources.filesource.inc \backup_migrate_destination_filesource::_backup_to_file_php()
Backup from this source.
1 call to backup_migrate_destination_filesource::_backup_to_file_php()
- backup_migrate_destination_filesource::backup_to_file in includes/
sources.filesource.inc - Backup from this source.
1 method overrides backup_migrate_destination_filesource::_backup_to_file_php()
- backup_migrate_files_destination_archivesource::_backup_to_file_php in includes/
sources.archivesource.inc - Backup from this source.
File
- includes/
sources.filesource.inc, line 105 - A destination type for saving locally to the server.
Class
- backup_migrate_destination_filesource
- A destination type for saving locally to the server.
Code
function _backup_to_file_php($file, $settings) {
if ($this
->check_libs()) {
$excluded_paths = empty($settings->filters['exclude_filepaths']) ? '' : $settings->filters['exclude_filepaths'];
$files = $this
->get_files_to_backup($this
->get_realpath(), $settings, $this
->get_excluded_paths($excluded_paths), DRUPAL_ROOT . '/');
if ($files) {
$file
->push_type('tar');
$gz = new Archive_Tar($file
->filepath(), false);
$gz
->addModify($files, '', $this
->get_realpath());
return $file;
}
backup_migrate_backup_fail('No files available.', array(), $settings);
return FALSE;
}
return FALSE;
}