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


Skip to content
  • Categories
  • Recent
  • Tags
  • Popular
  • Bookmarks
  • Search
Skins
  • Light
  • Cerulean
  • Cosmo
  • Flatly
  • Journal
  • Litera
  • Lumen
  • Lux
  • Materia
  • Minty
  • Morph
  • Pulse
  • Sandstone
  • Simplex
  • Sketchy
  • Spacelab
  • United
  • Yeti
  • Zephyr
  • Dark
  • Cyborg
  • Darkly
  • Quartz
  • Slate
  • Solar
  • Superhero
  • Vapor

  • Default (No Skin)
  • No Skin
Collapse
Brand Logo

Cloudron Forum

Apps | Demo | Docs | Install
  1. Cloudron Forum
  2. Uptime Kuma
  3. Clearing logs/data for Uptime Kuma

Clearing logs/data for Uptime Kuma

Scheduled Pinned Locked Moved Solved Uptime Kuma
11 Posts 3 Posters 5.9k Views 4 Watching
  • 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.
    • timconsidineT Offline
      timconsidineT Offline
      timconsidine
      App Dev
      wrote on last edited by
      #1

      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 ?

      fbartelsF girishG 2 Replies Last reply
      3
      • timconsidineT timconsidine

        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 ?

        fbartelsF Offline
        fbartelsF Offline
        fbartels
        App Dev
        wrote on last edited by
        #2

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

        girishG timconsidineT 2 Replies Last reply
        1
        • fbartelsF fbartels

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

          girishG Offline
          girishG Offline
          girish
          Staff
          wrote on last edited by girish
          #3

          @fbartels I think Settings -> Monitor History.

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

          1 Reply Last reply
          0
          • timconsidineT timconsidine

            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 ?

            girishG Offline
            girishG Offline
            girish
            Staff
            wrote on last edited by
            #4

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

            timconsidineT 1 Reply Last reply
            0
            • fbartelsF fbartels

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

              timconsidineT Offline
              timconsidineT Offline
              timconsidine
              App Dev
              wrote on last edited by
              #5

              @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
              0
              • girishG girish

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

                timconsidineT Offline
                timconsidineT Offline
                timconsidine
                App Dev
                wrote on last edited by
                #6

                @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 ?

                girishG 1 Reply Last reply
                0
                • timconsidineT timconsidine

                  @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 ?

                  girishG Offline
                  girishG Offline
                  girish
                  Staff
                  wrote on last edited by
                  #7

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

                  timconsidineT 1 Reply Last reply
                  1
                  • girishG girish

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

                    timconsidineT Offline
                    timconsidineT Offline
                    timconsidine
                    App Dev
                    wrote on last edited by
                    #8

                    @girish thank you !

                    timconsidineT 1 Reply Last reply
                    0
                    • nebulonN nebulon marked this topic as a question on
                    • nebulonN nebulon has marked this topic as solved on
                    • timconsidineT timconsidine

                      @girish thank you !

                      timconsidineT Offline
                      timconsidineT Offline
                      timconsidine
                      App Dev
                      wrote on last edited by
                      #9

                      @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 ?

                      girishG 1 Reply Last reply
                      0
                      • timconsidineT timconsidine

                        @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 ?

                        girishG Offline
                        girishG Offline
                        girish
                        Staff
                        wrote on last edited by
                        #10

                        @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).

                        timconsidineT 1 Reply Last reply
                        1
                        • girishG girish

                          @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).

                          timconsidineT Offline
                          timconsidineT Offline
                          timconsidine
                          App Dev
                          wrote on last edited by timconsidine
                          #11

                          @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
                          0
                          Reply
                          • Reply as topic
                          Log in to reply
                          • Oldest to Newest
                          • Newest to Oldest
                          • Most Votes


                            • Login

                            • Don't have an account? Register

                            • Login or register to search.
                            • First post
                              Last post
                            0
                            • Categories
                            • Recent
                            • Tags
                            • Popular
                            • Bookmarks
                            • Search