(resolved) Don't delete Log files, please!

Have some feedback, questions, suggestions, or just fancy a chat? Pop it in here.
Post Reply
Deleted User 201

(resolved) Don't delete Log files, please!

Post by Deleted User 201 »

Hi,
I'm new (3 months) user of DietPi... I love it.

I've read http://dietpi.com/phpbb/viewtopic.php?f ... art=20#p68 tread

I have enabled the Full Log System (syslogd + logrotate).
I see the log files in /var/log in the disk (correct):

[...]
-rwxrwxr-x 1 root adm 153804 Nov 12 18:29 auth.log
-rwxrwxr-x 1 root adm 0 Nov 10 11:21 auth.log.1
-rwxrwxr-x 1 root adm 0 Nov 10 11:21 auth.log.2.gz
[...]

But when I reboot the DietPi deletes the using recent log and logrotate create example.log.1 0 Kb ... I think this is not useful in Full Log System.
How can I change this option to not delete log files on reboot?

Thanks!
User avatar
Fourdee
Site Admin
Posts: 2787
Joined: Tue Feb 06, 2007 1:36 pm

Re: Don't delete Log files, please!

Post by Fourdee »

scx77 wrote:Hi,
I'm new (3 months) user of DietPi... I love it.

I've read http://dietpi.com/phpbb/viewtopic.php?f ... art=20#p68 tread

I have enabled the Full Log System (syslogd + logrotate).
I see the log files in /var/log in the disk (correct):

[...]
-rwxrwxr-x 1 root adm 153804 Nov 12 18:29 auth.log
-rwxrwxr-x 1 root adm 0 Nov 10 11:21 auth.log.1
-rwxrwxr-x 1 root adm 0 Nov 10 11:21 auth.log.2.gz
[...]

But when I reboot the DietPi deletes the using recent log and logrotate create example.log.1 0 Kb ... I think this is not useful in Full Log System.
How can I change this option to not delete log files on reboot?

Thanks!
The only time DietPi will automatically delete log file contents is with the hourly cron job. This will only run if you have selected a DietPi-Ramlog mode 1/2. I'll need to see some settings.

Whats the value of:

Code: Select all

cat /DietPi/dietpi/.installed | grep 'INDEX_LOGGING_CURRENT ' | awk '{print $2}'
and

Code: Select all

df -h
If you find our project or support useful, then we’d really appreciate it if you’d consider contributing to the project however you can.
Donating is the easiest – you can use PayPal or become a DietPi patron.
Deleted User 201

Re: Don't delete Log files, please!

Post by Deleted User 201 »

Code: Select all

cat /DietPi/dietpi/.installed | grep 'INDEX_LOGGING_CURRENT ' | awk '{print $2}'
-3

Code: Select all

df -h
/dev/root 59G 1.1G 58G 2% /
devtmpfs 483M 0 483M 0% /dev
tmpfs 487M 0 487M 0% /dev/shm
tmpfs 487M 6.5M 481M 2% /run
tmpfs 5.0M 0 5.0M 0% /run/lock
tmpfs 487M 0 487M 0% /sys/fs/cgroup
tmpfs 10M 960K 9.1M 10% /DietPi
tmpfs 487M 0 487M 0% /tmp
/dev/mmcblk0p1 56M 21M 36M 37% /boot
tmpfs 98M 0 98M 0% /run/user/1000


Grazie!
User avatar
Fourdee
Site Admin
Posts: 2787
Joined: Tue Feb 06, 2007 1:36 pm

Re: Don't delete Log files, please!

Post by Fourdee »

Found the culprit, dietpi-ramlog is clearing log file contents during boot. This will be resolved in v101 update.

https://github.com/Fourdee/DietPi/issues/112
If you find our project or support useful, then we’d really appreciate it if you’d consider contributing to the project however you can.
Donating is the easiest – you can use PayPal or become a DietPi patron.
Post Reply