capdrupal icon indicating copy to clipboard operation
capdrupal copied to clipboard

Lost of Rollback database

Open WengerK opened this issue 3 years ago • 0 comments

💬 Is your feature request related to a problem? Please describe.

When using the automatic rollback feature, the system will:

  1. Backup the database before anything
after :updated, "drupal:db:backup"
  1. When something went wrong will run the rollback process (delete database and re-mount the previous dump
before :failed, "drupal:db:rollback"
  1. then cleanup old database backup
  before :cleanup, "drupal:db:backup:cleanup"

During the drupal:db:rollback we have to (optionally) save the used database into a specific location, to prevent drupal:db:backup:cleanup to remove very important dump (before deploy crash it was the initial database state).

🧞 Describe the solution you'd like

Add a new configuration

set :keep_rollbacks, true

When use:

  • Copy the dump into a new directory rollback before any command

We also may add a new task drupal:db:rollback:check that ensure the rollback dir exists

WengerK avatar Apr 16 '21 07:04 WengerK