Is your feature request related to a problem?
On those large Mincraft servers, the size of DB ledger.sqlite rapidly grows (about 1GB in just 3-5 days), even with objectBlacklist.
Perhaps they 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 they need to look up logs from several months or even years ago?
I think a better solution would be to support logs import & export, so admins can effectively control the size of ledger.sqlite by periodically exporting and purging the old logs, without losing any of the past records.
Describe the solution you'd like.
-
Adds the ledger export command, which supports selectors similar to those used in inspect to select a range of logs to export. The export format can be .sqlite or .sql or .csv.
-
Add ledger import command to import previously exported log data back.
Describe alternatives you've considered.
Add API to support importing search results in LedgerApi, so we can develop an extension to realize this feature instead.
Agreements
Other
It is not feasible to operate the database of a running ledger mod directly using an external SQLite CLI. After testing, when using an external SQLite CLI to export data and execute VACUUM, it will conflict with the running ledger mod, causing the database into some problems or even corruption.
Therefore, Ledger's own Export function is still very necessary to implement.
Is your feature request related to a problem?
On those large Mincraft servers, the size of DB
ledger.sqliterapidly grows (about 1GB in just 3-5 days), even withobjectBlacklist.Perhaps they could set
autoPurgeDays = xxxin 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 they need to look up logs from several months or even years ago?I think a better solution would be to support logs import & export, so admins can effectively control the size of
ledger.sqliteby periodically exporting and purging the old logs, without losing any of the past records.Describe the solution you'd like.
Adds the
ledger exportcommand, which supports selectors similar to those used ininspectto select a range of logs to export. The export format can be.sqliteor.sqlor.csv.Add
ledger importcommand to import previously exported log data back.Describe alternatives you've considered.
Add API to support importing search results in
LedgerApi, so we can develop an extension to realize this feature instead.Agreements
Other
It is not feasible to operate the database of a running ledger mod directly using an external SQLite CLI. After testing, when using an external SQLite CLI to export data and execute VACUUM, it will conflict with the running ledger mod, causing the database into some problems or even corruption.
Therefore, Ledger's own Export function is still very necessary to implement.