function hosting_site_add_backup in Hosting 7.3
Same name and namespace in other branches
- 5 site/hosting_site.module \hosting_site_add_backup()
- 6.2 site/hosting_site.backups.inc \hosting_site_add_backup()
- 7.4 site/hosting_site.backups.inc \hosting_site_add_backup()
Add a site backup record.
Builds a list of backups of the site that have been generated.
4 calls to hosting_site_add_backup()
- hook_post_hosting_TASK_TYPE_task in ./
hosting.api.php - Perform actions when a task has completed succesfully.
- hosting_site_post_hosting_backup_task in site/
hosting_site.drush.inc - Implements hook_hosting_post_backup().
- 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.
- hosting_site_post_hosting_restore_task in site/
hosting_site.drush.inc - Implements hook_hosting_post_restore(). I am not very fond of the use of bitwise operators with negatives.
File
- site/
hosting_site.backups.inc, line 29 - Site backup functions.
Code
function hosting_site_add_backup($site, $web_server, $filename, $description = '', $size = '') {
$id = db_insert('hosting_site_backups')
->fields(array(
'site' => $site,
'web_server' => $web_server,
'filename' => $filename,
'description' => $description,
'size' => $size,
'timestamp' => REQUEST_TIME,
))
->execute();
return $id;
}