Old prune logs not purged

Prune logs older than 30 days (actually older than 90 days) are not being purged from Duplicacy/.duplicacy-web/repositories/localhost/all/.duplicacy/logs running Duplicacy Web 1.6.3 on a QNAP NAS. Is this a bug?

Are there any log files between 30-90 days old? If there aren’t, could it be that these files were left behind by a version earlier than 1.6.3?

I have posted this before, but for me, with the compiled version off the latest master branch, there are all kinds of logs left behind. Backups, checks, prunes, copies, restores etc. The oldest ones date back to June (pretty sure it was from the last time I manually cleaned it), so more than 90 days old.

I think something is getting deleted, because there are some gaps in dates, but clearly not everything.

There are weekly prune log files dating from 2022-06-05 through 2022-10-02. I believe I had to manually delete older log files. The date on the .list and .uninstall.sh files is 2022-06-03, so maybe that is when I installed 1.6.3?

When a log file is removed it is actually recorded in the main log file ~/.duplicacy-web/logs/duplicacy_web.log. You can check this file to see if deletions actually happened.

Another thing to note is, old log files are only checked and deleted only when the dashboard page is rendered. So you may have a lot of old log files supposed to be deleted if you don’t open the dashboard for a while.

The duplicacy_web.log file contains messages like:

2022/02/20 08:26:34 The log file prune-20220116-000832.log has been deleted
2022/09/27 18:33:36 The log file prune-20220827-113630.log has been deleted

and the oldest prune log file in .duplicacy-web/logs is prune-20220904-002725.log., so it appears that log files in this directory are being pruned.

However, the old prune-log files that haven’t been deleted are in Duplicacy/.duplicacy-web/repositories/localhost/all/.duplicacy/logs.

Sorry I didn’t pay attention to the log file location. Those are prune logs generated by the CLI, not the web GUI. They are never purged because when a chunk is missing they may provide a clue on how the chunk became missing.

But is it necessary to keep prune logs older than the last successful check?

1 Like

Good idea. If check applies to all revisions then, yes, old prune logs can be removed.