# Logs not being persisted hourly with DietPi-Ramlog #2

**URL:** <https://dietpi.com/forum/t/logs-not-being-persisted-hourly-with-dietpi-ramlog-2/4165>\
**Category:** Troubleshooting\
**Created:** [30 May 2020 21:58 UTC](https://dietpi.com/forum/t/logs-not-being-persisted-hourly-with-dietpi-ramlog-2/4165 "2020-05-30T21:58:00Z")\
**Posts on this page:** 4\
**Page:** 1

<div class="post-metadata">

**Author:** ![drool](https://dietpi.com/forum/letter_avatar_proxy/v4/letter/d/4af34b/32.png) [@drool](https://dietpi.com/forum/u/drool)\
**Post date:** [30 May 2020 21:58 UTC](https://dietpi.com/forum/t/logs-not-being-persisted-hourly-with-dietpi-ramlog-2/4165/1 "2020-05-30T21:58:00Z")

</div>

Hello all,

I have setup logging system to: “DietPi-Ramlog #2 : Hourly save, then clear.” and this option has kept the logs in RAMdisk for an hour and then appended logs hourly to /root/logfile\_storage in the past. But today I witnessed that the hourly appending has stopped and that the log file is just kept at /var/log/my\_custom\_logfile.log. I diff-ed files at /root/logfile\_storage to see if logs are getting hourly appended but there has been no change at all. The log files at RAMdisk at /var/log/\* keep getting larger. I rechecked that logging system is still set to “DietPi-Ramlog #2 : Hourly save, then clear.” and even switch to “DietPi-Ramlog #1” and back to #2, but that didn’t fix my issue.

Can someone help why is the hourly persistence/appending logs not working as intended.

---

<div class="post-metadata">

**Author:** ![Joulinar](https://dietpi.com/forum/user_avatar/dietpi.com/joulinar/32/57_2.png) [@Joulinar](https://dietpi.com/forum/u/Joulinar)\
**Post date:** [31 May 2020 19:50 UTC](https://dietpi.com/forum/t/logs-not-being-persisted-hourly-with-dietpi-ramlog-2/4165/2 "2020-05-31T19:50:38Z")

</div>

Hi,

many thanks for your request. I tried to replicate your issue, but without success. I created a dummy.log file and after a hour it was successfully transferred and shrieked. So in general the process is working fine.

```nohighlight
root@DietPi3:~# cd /var/log/
root@DietPi3:/var/log# ls -l
total 8
-rw-rw---- 1 root utmp 0 May 31 14:21 btmp
-rw-r--r-- 1 root root 0 May 31 18:17 dummy.log
-rw-rw-r-- 1 root utmp 292 May 31 21:47 lastlog
drwx------ 2 root root 40 May 31 02:17 private
-rw-rw-r-- 1 root utmp 384 May 31 21:47 wtmp
root@DietPi3:/var/log# cd /root/logfile_storage
root@DietPi3:~/logfile_storage# ls -la
total 24
drwxr-xr-x 2 root root 4096 May 31 18:17 .
drwx------ 6 root root 4096 May 31 00:17 ..
-rw-r--r-- 1 root root 20 May 31 18:17 dummy.log
-rw-r--r-- 1 root root 1168 May 31 18:17 lastlog
-rw-r--r-- 1 root root 7680 May 31 18:17 wtmp
root@DietPi3:~/logfile_storage#

```

---

<div class="post-metadata">

**Author:** ![drool](https://dietpi.com/forum/letter_avatar_proxy/v4/letter/d/4af34b/32.png) [@drool](https://dietpi.com/forum/u/drool)\
**Post date:** [1 June 2020 00:05 UTC](https://dietpi.com/forum/t/logs-not-being-persisted-hourly-with-dietpi-ramlog-2/4165/3 "2020-06-01T00:05:18Z")

</div>

Thanks for taking the time to respond.

This is what I am confused about as well. This functionality was working fine for me as well some time back but it has stopped functioning for me now. Is there a way I can pull logs on how logs are rotated? Can you share the script which is runs hourly to move logs from RAMDisk to persistent storage?

---

<div class="post-metadata">

**Author:** ![Joulinar](https://dietpi.com/forum/user_avatar/dietpi.com/joulinar/32/57_2.png) [@Joulinar](https://dietpi.com/forum/u/Joulinar)\
**Post date:** [1 June 2020 11:04 UTC](https://dietpi.com/forum/t/logs-not-being-persisted-hourly-with-dietpi-ramlog-2/4165/4 "2020-06-01T11:04:56Z")

</div>

Hi,

best to my knowledge there is not log from the script itself. The following script is used to move logs to backup location /boot/dietpi/func/dietpi-logclear

As well you could have it executed manually using following options

```nohighlight
        #////////////////////////////////////
        # Info:
        # - Location: /boot/dietpi/func/dietpi-logclear
        # - Clears logs in $FP_LOG, with backup option.
        #
        # usage:
        # - dietpi-logclear 0 | Update current log files data to "$FP_BACKUP/*. Then clear contents.
        # - dietpi-logclear 1 | Clear contents of all logs in $FP_LOG.
        # - dietpi-logclear 2 | Delete all logs in $FP_LOG and backups.
        #////////////////////////////////////

```

The script themselves is triggered by /etc/cron.hourly/dietpi and it depends on correct setting in /boot/dietpi/.installed. In your case it should looks like this:

```nohighlight
# DietPi Choice System: Logging
INDEX_LOGGING_CURRENT=-2
INDEX_LOGGING_TARGET=-2

```
