This will output all the logs between from and to, on an 1-hour interval, with NUM number of parallel workers, into the directory with the prefix configured. One thing to note that for each file the log lines are sorted from latests to oldest (so opposite to how you’d usually see from a logfile). I don’t think this can be changed.
You can also do API, but you’d have to take into account of number of results returned so you can set maxi return log lines appropriately, and you’d of course want to loop your API call on a smaller interval instead of querying for 2 months at once.
I am trying to export using logCLI. The above request are getting generated when I run the logcli command. I tried to set the limit to 0 and other values (like 5000) too but the request still gets generated with 1000 as limit. I have the following questions
Does this limit cause loss of log export?
How to override the limit ?
What should I do to the loki config file to prevent any limits in the export ?
Then it’s probably batching it. Did you compare the entire output to the actual number of logs from Loki? You can probably try it for a day or two to verify.