function backup_migrate_prune_prune in Backup and migrate prune 7
Same name and namespace in other branches
- 7.2 backup_migrate_prune.module \backup_migrate_prune_prune()
Helper function to prune a destination
Parameters
$gardener_id: The id of the gardener
2 calls to backup_migrate_prune_prune()
- backup_migrate_prune_cron in ./
backup_migrate_prune.module - Implementation hook_cron().
- backup_migrate_prune_prune_form_submit in ./
backup_migrate_prune.module - Submit function for backup_migrate_prune_prune_form
File
- ./
backup_migrate_prune.module, line 378 - Create (manually or scheduled) and restore backups of your Drupal MySQL database with an option to exclude table data (e.g. cache_*)
Code
function backup_migrate_prune_prune($gardener_id) {
try {
$gardener = new Gardener($gardener_id);
if ($deleted = $gardener
->prune()) {
watchdog('backup_migrate_prune', t('Deleted %num backups.', array(
'%num' => $deleted,
)), array(), WATCHDOG_NOTICE);
}
} catch (ErrorException $e) {
drupal_set_message($e
->getMessage(), 'error');
}
}