function hosting_site_add_backup in Hostmaster (Aegir) 6
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 modules/
hosting/ hosting.api.php - Perform actions when a task has completed succesfully.
- hosting_site_post_hosting_backup_task in modules/
hosting/ site/ hosting_site.drush.inc - Implementation of hook_hosting_post_backup
- hosting_site_post_hosting_disable_task in modules/
hosting/ site/ hosting_site.drush.inc - implementation of hook_hosting_post_disable I am not very fond of the use of bitwise operators with negatives.
- hosting_site_post_hosting_restore_task in modules/
hosting/ site/ hosting_site.drush.inc - implementation of hook_hosting_post_restore I am not very fond of the use of bitwise operators with negatives.
File
- modules/
hosting/ site/ hosting_site.backups.inc, line 25 - Site backup functions.
Code
function hosting_site_add_backup($site, $web_server, $filename, $description = '', $size = '') {
db_query("INSERT INTO {hosting_site_backups} (site, web_server, filename, description, size, timestamp) VALUES (%d, %d, '%s', '%s', %d, %d)", $site, $web_server, $filename, $description, $size, time());
$bid = db_last_insert_id('hosting_site_backups', 'bid');
return $bid;
}