But file is not editable.
Would like to change rotate 7 to rotate 1 to reduce junk.
You likely could copy that file into your host’s /etc/logrotate.d and have that process rotate things more aggressively than what LXD does on startup.
Does that not produce concurrent logrotates?
I guess, it won’t matter.
Will try it.
LXD doesn’t run logrotate on a schedule, it only gets called when LXD restarts, so it shouldn’t conflict too much with a more traditional daily logrotate.
Placing /snap/lxd/current/etc/logrotate.conf in host’s /etc/logrotate.d/lxd with a rotate of 1, hasnt work.
It still produces:
-rw-r–r-- 1 root root 5.4K Dec 11 10:25 lxd.log
-rw-r–r-- 1 root root 6.6K Dec 11 08:25 lxd.log.1
-rw-r–r-- 1 root root 1.5K Dec 11 04:50 lxd.log.2.gz
-rw-r–r-- 1 root root 1.5K Dec 10 20:15 lxd.log.3.gz
-rw-r–r-- 1 root root 1.4K Dec 10 12:25 lxd.log.4.gz
-rw-r–r-- 1 root root 4.2K Dec 10 10:00 lxd.log.5.gz
-rw-r–r-- 1 root root 1.6K Dec 8 19:14 lxd.log.6.gz
and it doesnt seem that it is related to lxd restart, it goes through schedule and logrotate cycle.