Closed robertgarrigos closed 1 year ago
I'm not sure. My first thoughts are if the module is disabled the snapshots should remain. If it is uninstalled they should probably be deleted. Maybe a warning that uninstalling the module will delete existing snapshots would be helpful?
I agree. Although, I have been looking how Backup migrate does it, as an example, and it doesn't delete the backup files on uninstalling. Let's leave this as it's working now.
I agree. If Backup Migrate doesn't delete the files maybe demo module shouldn't either. In fact since the demo module does a complete restore of the database removing any tables added since the snapshot was taken it is in many ways a cleaner restore than one done with backup_migrate. If it is uninstalled and later re-installed problems may occur with a future restore if other modules have since been uninstalled. This would also be true with backup_migrate and neither includes warnings for missing modules. Also with either one any content created after the backup/snapshot will be lost on restore.
I certainly find the demo module very useful when developing and testing and have done so on drupal sites for some time. I don't use the cron reset because I'm only using it for snapshots, not as a full demonstration site.
Backup_migrate is still the go to module for usual backups for us but the demonstration module with snapshots is great for development and testing having been caught out a few times with added tables.
The backup_migrate module has an Advanced Option in settings to "drop all tables before import (MySQL only)" making the restore behaviour like the demonstration module.
Right now, uninstalling the module does not empty the snapshot's directory. What would you prefer to do when uninstalling: delete or not delete the snapshots?