backup.provision.inc

  1. 7.x-3.x platform/backup.provision.inc
  2. 7.x-3.x db/backup.provision.inc

Functions

File

db/backup.provision.inc
View source
  1. <?php
  2. function drush_db_pre_provision_backup() {
  3. d()->service('db')->generate_dump();
  4. }
  5. function drush_db_pre_provision_backup_rollback() {
  6. provision_file()->unlink(d()->site_path . '/database.sql')
  7. ->succeed('Deleted mysql dump from sites directory')
  8. ->fail('Could not delete mysql dump from sites directory');
  9. }
  10. function drush_db_post_provision_backup() {
  11. drush_db_pre_provision_backup_rollback();
  12. }