function hosting_site_post_hosting_backup_task in Hosting 7.4
Same name and namespace in other branches
- 5 site/hosting_site.drush.inc \hosting_site_post_hosting_backup_task()
- 6.2 site/hosting_site.drush.inc \hosting_site_post_hosting_backup_task()
- 7.3 site/hosting_site.drush.inc \hosting_site_post_hosting_backup_task()
Implements hook_hosting_post_backup().
Adds the data file that was saved to the site backup history. This is needed to be able to restore.
4 calls to hosting_site_post_hosting_backup_task()
- hosting_clone_post_hosting_clone_task in clone/
hosting_clone.drush.inc - @todo Please document this function.
- hosting_migrate_post_hosting_migrate_task in migrate/
hosting_migrate.drush.inc - @todo Please document this function.
- hosting_site_post_hosting_delete_task in site/
hosting_site.drush.inc - Implements hook_post_hosting_TASK_TYPE_task().
- hosting_site_post_hosting_disable_task in site/
hosting_site.drush.inc - Implements hook_hosting_post_disable(). I am not very fond of the use of bitwise operators with negatives.
File
- site/
hosting_site.drush.inc, line 251 - Drush hooks for the Hosting site module.
Code
function hosting_site_post_hosting_backup_task($task, $data) {
if ($data['context']['backup_file'] && $task->ref->type == 'site') {
$platform = node_load($task->ref->platform);
$desc = $task->task_args['description'];
$desc = $desc ? $desc : t('Generated on request');
hosting_site_add_backup($task->ref->nid, $platform->web_server, $data['context']['backup_file'], $desc, $data['context']['backup_file_size']);
}
}