Cloudron makes it easy to run web apps like WordPress, Nextcloud, GitLab on your server. Find out more or install now.


    Cloudron Forum

    • Register
    • Login
    • Search
    • Categories
    • Recent
    • Tags
    • Popular

    Solved Clearing logs/data for Uptime Kuma

    Uptime Kuma
    3
    11
    913
    Loading More Posts
    • Oldest to Newest
    • Newest to Oldest
    • Most Votes
    Reply
    • Reply as topic
    Log in to reply
    This topic has been deleted. Only users with topic management privileges can see it.
    • timconsidine
      timconsidine App Dev last edited by

      My instance of Uptime Kuma is showing (in System Info) 2.89Gb used, presumably logs.
      I have cleared all statistics and shrunk database in Settings/ Monitor History.
      But 24 hours later, it is still showing 2.89Gb used.

      Issue is that my automated backups seem to stall when doing the backup for Uptime Kuma, which then affects other apps in the backup queue.

      I have set history to 15 days to prevent it growing large again.
      But how do I clear the logs which seem to be retained even after clearing statistics and shrinking database ?

      fbartels girish 2 Replies Last reply Reply Quote 3
      • fbartels
        fbartels App Dev @timconsidine last edited by

        Hi @timconsidine,
        I'm not exactly sure, where you see these 3gb. Is that in Cloudron or in the monitor history of Kuma itself?

        girish timconsidine 2 Replies Last reply Reply Quote 1
        • girish
          girish Staff @fbartels last edited by girish

          @fbartels I think Settings -> Monitor History.

          I have a database size of 360MB with 180 day retention with ~30 monitors.

          1 Reply Last reply Reply Quote 0
          • girish
            girish Staff @timconsidine last edited by

            @timconsidine For me, 'clear all statistics' does 0 out the database. Did you check the sizes in /app/data/data/* ?

            timconsidine 1 Reply Last reply Reply Quote 0
            • timconsidine
              timconsidine App Dev @fbartels last edited by

              @fbartels said in Clearing logs/data for Uptime Kuma:

              Hi @timconsidine,
              I'm not exactly sure, where you see these 3gb. Is that in Cloudron or in the monitor history of Kuma itself?

              In Cloudron's System Info

              1 Reply Last reply Reply Quote 0
              • timconsidine
                timconsidine App Dev @girish last edited by

                @girish said in Clearing logs/data for Uptime Kuma:

                @timconsidine For me, 'clear all statistics' does 0 out the database. Did you check the sizes in /app/data/data/* ?

                Err no
                But checking now it shows a bunch *bak* files :

                root@4b5f68b4-04a6-43f6-b636-77ee08f43d90:/app/data/data# ls -alhtr *.bak*
                -rw-r--r-- 1 cloudron cloudron 372M Mar 24 23:01 kuma.db.bak20220324230123
                -rw-r--r-- 1 cloudron cloudron  32K Mar 24 23:01 kuma.db-shm.bak20220324230123
                -rw-r--r-- 1 cloudron cloudron 389M Mar 24 23:01 kuma.db-wal.bak20220324230123
                -rw-r--r-- 1 cloudron cloudron 370M Apr 12 22:01 kuma.db.bak20220412220130
                -rw-r--r-- 1 cloudron cloudron  32K Apr 12 22:01 kuma.db-shm.bak20220412220130
                -rw-r--r-- 1 cloudron cloudron 389M Apr 12 22:01 kuma.db-wal.bak20220412220130
                -rw-r--r-- 1 cloudron cloudron 433M Apr 24 22:02 kuma.db.bak20220424220236
                -rw-r--r-- 1 cloudron cloudron  32K Apr 24 22:02 kuma.db-shm.bak20220424220236
                -rw-r--r-- 1 cloudron cloudron 389M Apr 24 22:02 kuma.db-wal.bak20220424220236
                -rw-r--r-- 1 cloudron cloudron  17M Jun 22 22:02 kuma.db.bak20220622220236
                -rw-r--r-- 1 cloudron cloudron  32K Jun 22 22:02 kuma.db-shm.bak20220622220236
                -rw-r--r-- 1 cloudron cloudron 400M Jun 22 22:02 kuma.db-wal.bak20220622220236
                

                I didn't know about these.
                That confirms Cloudron's System Info reported size.
                Presumably OK to delete these ?

                Any idea why they are not auto-deleted ?

                girish 1 Reply Last reply Reply Quote 0
                • girish
                  girish Staff @timconsidine last edited by

                  @timconsidine maybe it creates these automatically across updates. Seems safe to delete.

                  timconsidine 1 Reply Last reply Reply Quote 1
                  • timconsidine
                    timconsidine App Dev @girish last edited by

                    @girish thank you !

                    timconsidine 1 Reply Last reply Reply Quote 0
                    • Topic has been marked as a question  nebulon nebulon 
                    • Topic has been marked as solved  nebulon nebulon 
                    • timconsidine
                      timconsidine App Dev @timconsidine last edited by

                      @timconsidine Hmmmm
                      Deleted strange 'orphan *.bak* files
                      Away for a couple days (so time for stats to reset)
                      UptimeKuma now showing as 3.89Gb usage (it's not)
                      Backup taking forever and blocking overall backup process.
                      Suggestions for what to check / fix ?

                      girish 1 Reply Last reply Reply Quote 0
                      • girish
                        girish Staff @timconsidine last edited by

                        @timconsidine Was the database ever 0 size? I think there is some upstream bug that clearing database does not clear the database. It seems they enable WAL/Journaling in the sqlite database and maybe that persists (I don't know sqlite well enough to know a workaround).

                        timconsidine 1 Reply Last reply Reply Quote 1
                        • timconsidine
                          timconsidine App Dev @girish last edited by timconsidine

                          @girish not sure about 0 size ever, but I don't think so.
                          Anyway, after deleting some new .bak files from /app/data/data, Cloudron System Info now reporting a more reasonable 455Mb size for the deployed app.

                          Will try and keep an eye on it.
                          May export, uninstall, reinstall, import.
                          Although I think I did that once before.

                          Clearing all stats and shrinking database gives a 1.5Mb size.

                          1 Reply Last reply Reply Quote 0
                          • First post
                            Last post
                          Powered by NodeBB