Database Backup for H2
Gilthunderx opened this issue ยท 2 comments
Description
Ive been told that there is a lot of reason why a database breaks, in this case there should be a feature that helps server owner in recovering a H2 Database, they dont take a lot of space , in fact my 10 MB H2 Database stopped working recently and I was not able to make a backup , and now we are forced to reset.
Proposed Behaviour
Players will get to Keep atleast 7 Database backup in compressed file so it does not take much space.
A backup should be generated once per day.
A backup folder where we can see at least the 7 Database generated by the past 7 days.
Extra Details
No response
You can use the /lp export
command to easily make a backup of your permissions data. This works for all storage types :)
You're free to use some other plugin/utility/tool to run this command automatically at a set time or whenever the server starts.
Backing up the H2 database file would work too, but I recommend to be safe you only attempt this while the file is not being read/written to (i.e. when the server is not running). Adding a function to do this automatically is out of scope for LuckPerms in my opinion. You would be better off setting up frequent, sequential backups of your whole server.
A feature I could potentially get behind is LP automatically running /lp export on a timer, but I think even that is a bit niche. Usually software doesn't have functionality to automatically back itself up... that's for the system administrator to configure to their own requirements.
A feature I could potentially get behind is LP automatically running /lp export on a timer
I've thought about this a bit more, I don't think it's something that fits inside LP.
I suggest you do this instead :)
You're free to use some other plugin/utility/tool to run this command automatically at a set time or whenever the server starts.