theotherp / nzbhydra2

Usenet meta search
Other
1.22k stars 75 forks source link

Backup Temp Files Are Not Being Cleaned Up #863

Open pugfantus opened 1 year ago

pugfantus commented 1 year ago

When backups are run, they are not removing the temp sql dumps that are created. These temp files are filling up my container after a few weeks. When this happens, nzbhydra attempts to shutdown, and causes the config file to not save properly. The config file is seen as corrupted upon restart, which means I have to restore it from a previous backup once I clean up the temp files.

I found steps from another issue to help defrag and shrink the size of the db, which has helped a little, but the issue remains where the uncompressed temp files are not being reaped. I've thought about setting up a cronjob to remove them periodically, but I wanted to check here first incase I've misconfigured something.

root@dia:/tmp# ls -lh /opt/nzbhydra2/data/backup/*
-rw-r--r-- 1 nzbhydra2 nzbhydra2 1.4G Apr 18 04:04 '/opt/nzbhydra2/data/backup/nzbhydra-2023-04-18 03-54-55.zip'
-rw-r--r-- 1 nzbhydra2 nzbhydra2 1.4G Apr 24 22:26 '/opt/nzbhydra2/data/backup/nzbhydra-2023-04-24 22-17-20.zip'
-rw-r--r-- 1 nzbhydra2 nzbhydra2 1.3G Apr 25 04:36 '/opt/nzbhydra2/data/backup/nzbhydra-2023-04-25 04-26-36.zip'
-rw-r--r-- 1 nzbhydra2 nzbhydra2 1.4G May  2 05:32 '/opt/nzbhydra2/data/backup/nzbhydra-2023-05-02 05-22-41.zip'
-rw-r--r-- 1 nzbhydra2 nzbhydra2 1.4G May  9 05:41 '/opt/nzbhydra2/data/backup/nzbhydra-2023-05-09 05-32-21.zip'
root@dia:/tmp# ls -lh nzbhydra*
-rw-r--r-- 1 nzbhydra2 nzbhydra2 2.4G May  9 05:40 nzbhydra18099182130272538951zip
-rw-r--r-- 1 nzbhydra2 nzbhydra2 2.4G May  2 05:31 nzbhydra2434375385275361091zip

nzbhydra-debuginfos-2023-05-13-13-41.zip

Version: 5.1.8 (and older versions as well) OS: Debian 11 LXC

theotherp commented 1 year ago

I'm currently moving to another city. I'll look into it when I'm finished.

theotherp commented 3 months ago

Should be fixed by now. Temp files are always deleted after being used.