Confirmation for import backup
GiaNTizmO opened this issue ยท 3 comments
Description
Add confimation for importing new data for not an empty database with a notification that old data will be deleted before importing new data.
We recently decided to switch from the h2 storage type to mongodb. To do this , we performed data export and then, when importing to the shared database, we realized that importing a backup, the old data is deleted. Thus, our servers have suffered a lot due to the lack of notification about the loss of old data.
Proposed behaviour
If there are records in the luckperms database, when importing data, display a notification about the loss of current data in the database and ask for confirmation of the command.
Well I do agree with the confirm command, and the suggestion is probably possible as it already done for bulk edit.
But if you have read what the command does before running... you won't have face this issue lol. See: https://github.com/lucko/LuckPerms/wiki/Command-Usage:-General#lp-import-filecode---upload---merge. It clearly says "the existing permissions setup will be overriden and replaced." and if you want to merge instead, use something like /lp import file --merge
. And you can also backup before importing with /lp export
;)
In part, I agree with you, but it would still be good to add a notification. Let's just say, just to be safe :)