Hi! I moved my entire PiHole install from one machine to another due to the first one dying. I managed to restore everything in the other machine except the history, as that just shows zero requests before the restore date.
I can see a 1GB pihole-FTL.db, so I know that I have everything. I could even log in with the password from the old install but the old history is completely gone.
Any idea of what it could be and what I could do to restore the old history? Thanks!
Please upload a debug log and post just the token URL that is generated after the log is uploaded by running the following command from the Pi-hole host terminal:
How did you conclude that your older data is unavailable?
I just tried to recreate your issue and copied an older database file to my Docker PI-hole's directory and had no difficulties plotting some Long-term Data | Graphics for a period covered by that database.
From what you've shared so far, I can see no reason why it shouldn't work for you.
What is the actual output when you try to plot some month of Long-term Data | Graphics covered by your database?
Statistics and logs were reset, that made me suspicious. Now that the file size not only has stayed the same but even increased since the 18th makes me think that is there, just now showing up.
Okay, I deleted the local image, container and Docker network and ran everything again with docker compose up -d and it now shows everything as expected.
The dashboard statistics only cover the most recent 24 hours.
If data from your database would have been older than 24 hours at the time of restoration, the dashboard would indeed have been void of data initially.
Plotting data may take a long time (and even fail due to insufficient memory) if there's a lot of data - so that would suggest there is indeed data retrievable.
What is the output of:
docker exec <container-id> pihole-FTL sqlite3 /etc/pihole/pihole-FTL.db "SELECT count(*), client \
FROM queries WHERE timestamp>=strftime('%s', DATETIME('2023-04-01')) \
AND timestamp<=strftime('%s', DATETIME('2023-05-01'))
GROUP BY client ORDER BY 1 DESC;"
EDIT: I see you're sorted - you may disregard that SELECT.