backdrop-contrib / backup_migrate

Port of the Drupal backup_migrate module to Backdrop
GNU General Public License v2.0
7 stars 14 forks source link

Cannot restore only the database from a backup of both database and active config. #166

Open izmeez opened 4 months ago

izmeez commented 4 months ago

If a manual backup is done of Database and Active Config Directory and then a restore of the backup is done selecting only Database it fails with the error:

Unable to restore from file /tmp/backupmigrate....db_config.tar because a tar file can't be restored to this database.

Restoring both database and active config works but may not be what the user wants to do.

argiepiano commented 4 months ago

Yes, this is expected. You can't do a Database restore from a file that contains something else. Perhaps there is lack of clarity in the choice - this choice is not supposed to give you options of what to restore, but is rather a way for the user to indicate the type of backup file you are trying to restore. The file type and the destinations must match.

BTW this confusion has been pointed out in other issues.

Perhaps there should be a way to prevent the fatal error and instead indicated the mismatch before trying to process the backup restore.

izmeez commented 4 months ago

@argiepiano Thank you for the reply. It sounds like it is "By design".

Perhaps there should be a way to prevent the fatal error and instead indicated the mismatch before trying to process the backup restore.

  1. It may make more sense if there is a notice rather than an error.

  2. It may require something more to help users understand this restriction: that combined backups can only be used for combined restores. It may affect the workflow of different use cases.

Previously bam only did one thing, the database. Now with the option to include the active config with the database the implications of restore is evident.

argiepiano commented 4 months ago

I agree this is confusing. I think the way to go here is to check the type of source in a form validation. Also perhaps add some help text to the form.

izmeez commented 4 months ago

Now, with a better understanding of the way the combined backup/restore works we have changed our workflow. Some extra help text is a good idea.