Support for Drupal 7 is ending on 5 January 2025—it’s time to migrate to Drupal 10! Learn about the many benefits of Drupal 10 and find migration tools in our resource center.
Problem/Motivation
When accidentally trying to restore a totally wrong type of file the restore process seems to operate normally and retuns message:
"Restore Complete."
Steps to reproduce the problem:
1. Backup a site with B&M-module and export also the site configuration separately
2. Try to restore the site using a wrong file, config-www-xyz...-34.tar.gz in this case
3. Restore seems to go nicely (except very fast) and retuns msg "Restore Complete."
4. Nothing else happens, no errors in the report log
Comment | File | Size | Author |
---|---|---|---|
#4 | throw_message_error_wrong_db-2945253-4.patch | 3.99 KB | liliancatanoi90 |
|
Comments
Comment #2
emartoni CreditAttribution: emartoni at CI&T commentedComment #3
emartoni CreditAttribution: emartoni at CI&T commented* Desired solution: When the module creates the compressed file, it add some metatada into this file, making possible to identify if it was created by module. Unfortunilly this metadata are removed when the file is downloaded. If this data persist, we can use it to identify and avoid the success message if file is not a backup.
* Possible solution: Add an empty file to identify that this file was created by BM module and display the success message if all goes right.
Comment #4
liliancatanoi90 CreditAttribution: liliancatanoi90 as a volunteer and at Intellix commentedAttached a patch with a solution. Throws an error if file line doesn't contains a sql command.
Comment #5
liliancatanoi90 CreditAttribution: liliancatanoi90 as a volunteer and at Intellix commentedComment #6
Dinu R. CreditAttribution: Dinu R. as a volunteer and at Intellix commentedComment #8
Alex Andrascu CreditAttribution: Alex Andrascu at Intellix for Intellix commentedComment #9
DamienMcKenna