QuiltServerTools / Ledger

A server-side logging mod for fabric 1.17+
https://www.quiltservertools.net/Ledger/latest/
GNU Lesser General Public License v3.0
190 stars 53 forks source link

Support switching different DBs at regular intervals #283

Open yqs112358 opened 3 months ago

yqs112358 commented 3 months ago

Is your feature request related to a problem?

As single ledger.sqlite takes a lot of space on disk, I think it's better to support spliting different DBs at regular intervals, which is not a replacement for purge, but a nice addition function.

On my Mincraft server, the record DB ledger.sqlite rapidly growing to about 1GB in just 7 days. Perhaps I could set autoPurgeDays = xxx in the config file to limit the number of days the logs are stored, thus to limit the size of DB. But that's not good enough: What can I do when I need to look up logs from a month ago?

I think a better solution would be to support switching database files at regular intervals. For example, every 7 days, or every month, ledger would change to use a new DB file. DBs that have been archived can be uploaded elsewhere (e.g. to google drive / onedrive) using tools like automated scripts.

This allows for a better balance between log retention and space consumption.

Describe the solution you'd like.

Describe alternatives you've considered.

/

Agreements

Other

No response

yqs112358 commented 3 months ago

Some possible alternative solution: #286