Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Logfiles under /etc/pihole #5631

Open
poldy79 opened this issue Apr 1, 2024 · 3 comments
Open

Logfiles under /etc/pihole #5631

poldy79 opened this issue Apr 1, 2024 · 3 comments

Comments

@poldy79
Copy link

poldy79 commented Apr 1, 2024

Versions

  • Pi-hole: version is v5.18.2 (Latest: v5.18.2)
  • web version is v5.21 (Latest: v5.21)
  • FTL: version is v5.25.1 (Latest: v5.25.1)
  • AdminLTE: Unknown, can not be determined with pihole -v

Platform

  • OS and version: Debian 12.5
  • Platform: lxc container on x64

Expected behavior

  • All log-files should be stored below /var/log
  • All database-type files should be stored below /var/lib
  • only configuration files should be placed below /etc

Auto generated configuration files could still be placed below /etc

Actual behavior / bug

Files

  • /etc/pihole/pihole-FTL.db
  • /etc/pihole/versions

are no real configuration files. pihole-FTL.db is a database and should be placed below /var/lib/pihole. Regarding versions I am not quite sure.

Usually, I use etckeeper on my debian machines. This caused the git repo to grow constantly resulting in a full disk, even if pihole-FTL.db would have been truncated using MAXLOGAGE. I had to add pihole-FTL.db to .gitignore.

Reading further in the documentation, DBFILE=/var/lib/pihole/pihole-FTL.db in pihole-FTL.conf could have done the job. Perhaps this should be the default.

Just` did a fresh install of pihole to confirm that this is not already the case

 root@piholetest:~# cat /etc/pihole/pihole-FTL.conf 
#; Pi-hole FTL config file
#; Comments should start with #; to avoid issues with PHP and bash reading this file
PRIVACYLEVEL=0
root@piholetest:~# 

Steps to reproduce

ls -l /etc/pihole inspect file modification timestamps using stat.
Perhaps install etckeeper (debian package available) to track file changes.

Debug Token

Screenshots

n/a

Additional context

n/a

@thomasmerz
Copy link
Sponsor

Moving pihole-FTL.db (and other files) to a different location won't be easy with running docker installations: once it's changed/(pre)set in the config, there's some orchestration neccessary to move all related files and add a volume for the new location etc. ⚠️

Copy link

github-actions bot commented May 4, 2024

This issue is stale because it has been open 30 days with no activity. Please comment or update this issue or it will be closed in 5 days.

@github-actions github-actions bot added the stale label May 4, 2024
@poldy79
Copy link
Author

poldy79 commented May 6, 2024

Docker is not an easy one, and I think it is not worth tying to fix existing installations.

The setup-wizard could adapt the configuration (by asking for a location, providing a reasonable default).

@github-actions github-actions bot removed the stale label May 6, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants