USB (for logs) full. How to clean older?

Skylink
Skylink Posts: 32  Freshman Member
First Comment Friend Collector Fifth Anniversary
edited April 2021 in Security
Hi everybody!

I have correctly configured my USG60W to store a copy of logs on a USB drive.
Very simple, but...

After 8 months the USB (16Gb) is full.
Since i need to store at least 6 months .. how can i do to delete the older logs automatically?
(now, i've delete 2 month manually to restore the process)

A couple of week ago i have try to prevent the problem of space running out enabling this flags..



but i think it doesn't works because (before my clean) the April logs were still archived on the stick.

The reason for this problem (or small bug, I do not know) could be due by the oldest date already stored?
Since it was greater than the requested in days (for me: 200).

Comments

  • Zyxel_Chris_H
    Zyxel_Chris_H Posts: 28  Freshman Member
    First Answer First Comment Friend Collector
    edited December 2018
    Hi @Skylink

    I just did a quick test and it is working as expected.

    Following is my test method:

    1. Configuration -> Log Settings -> USB Storage -> Edit  -> Set Keep log keep duration for 200 days 


    2. Set Date/Time by manual in Configuration -> System -> Date/Time -> Select “Manual”

    3. Set Date to 2018-11-16 / Time to 23:59:00


    4. After 1 minutes and then Date become 2018-11-17

    5. Maintenance -> Diagnostics -> System Log : I found that all USB logs before 5/1 are deleted

     You can follow my method to test again,

    If test result still fail in your side, could you share your FW version and send me starup-config.conf in private message.

    I will check for you.


  • Skylink
    Skylink Posts: 32  Freshman Member
    First Comment Friend Collector Fifth Anniversary
    ok, so the days into "log keep duration Settings" for USB storage is the key.
    thank you for confirmation.

    what i verified is that...
    after a manual clean of the days (already stored into the USB) older than the date calculated (200, for me)... the "automatic delete" seams to works.

    Anyway, today the last stored is the 21 May. 
    i'll check tomorrow.
  • Skylink
    Skylink Posts: 32  Freshman Member
    First Comment Friend Collector Fifth Anniversary
    After 2 months, i can confirm that is storing only the 200 last days (as i needed).
    Now about 20% of free space remains on the USB drive.

    But I have the feeling that it started to work only after the manual clean of oldest days (ones that were already been stored before my modify. I mean oldest that the 200 days required).
  • Jeremylin
    Jeremylin Posts: 166  Master Member
    First Answer First Comment Third Anniversary
    The oldest log need to be deleted manually. If message already been restored  before you enable this feature.


  • Skylink
    Skylink Posts: 32  Freshman Member
    First Comment Friend Collector Fifth Anniversary
    Jeremylin said:
    The oldest log need to be deleted manually. If message already been restored  before you enable this feature.


    yes, is what Zyxel_Chris_H confirmed, too.