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. App Packaging & Development
  3. Hack a custom backup Retention and Schedule

Hack a custom backup Retention and Schedule

Scheduled Pinned Locked Moved App Packaging & Development
7 Posts 2 Posters 1.2k Views 2 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.
    • robiR Offline
      robiR Offline
      robi
      wrote on last edited by robi
      #1

      Can we do something like pick one of the least appealing options for backup/retention options and manually change the numbers in box code behind the scenes, so that we get the custom timing we desire w/o losing the config as Cloudron updates? (unless we change the UI backup options again)

      Will anything overwrite this other than UI selection?

      That way at least advanced users can tune their fleet. 🙂

      Conscious tech

      fbartelsF 1 Reply Last reply
      0
      • robiR robi

        Can we do something like pick one of the least appealing options for backup/retention options and manually change the numbers in box code behind the scenes, so that we get the custom timing we desire w/o losing the config as Cloudron updates? (unless we change the UI backup options again)

        Will anything overwrite this other than UI selection?

        That way at least advanced users can tune their fleet. 🙂

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

        Hi @robi,

        what kind of settings do you want to change? I would always discourage changing source files, simply because any update could potentially overwrite the custom changes.

        Even if retention and schedule patterns
        are not part of the documentation, looking in the browser console they still can be set with a simple curl request.

        curl 'https://my.xxx/api/v1/settings/backup_config' \
          -H 'authorization: Bearer xxx' \
          --data-raw '{"provider":"minio","format":"tgz","bucket":"xxx-9wdeu","prefix":"","accessKeyId":"xxx","secretAccessKey":"●●●●●●●●","endpoint":"https://xxx","region":"us-east-1","acceptSelfSignedCerts":false,"s3ForcePathStyle":true,"retentionPolicy":{"keepWithinSecs":2592000},"schedulePattern":"00 00 23 * * *","memoryLimit":8589934592,"uploadPartSize":20971520,"password":"●●●●●●●●"}' \
          --compressed
        
        robiR 1 Reply Last reply
        3
        • fbartelsF fbartels

          Hi @robi,

          what kind of settings do you want to change? I would always discourage changing source files, simply because any update could potentially overwrite the custom changes.

          Even if retention and schedule patterns
          are not part of the documentation, looking in the browser console they still can be set with a simple curl request.

          curl 'https://my.xxx/api/v1/settings/backup_config' \
            -H 'authorization: Bearer xxx' \
            --data-raw '{"provider":"minio","format":"tgz","bucket":"xxx-9wdeu","prefix":"","accessKeyId":"xxx","secretAccessKey":"●●●●●●●●","endpoint":"https://xxx","region":"us-east-1","acceptSelfSignedCerts":false,"s3ForcePathStyle":true,"retentionPolicy":{"keepWithinSecs":2592000},"schedulePattern":"00 00 23 * * *","memoryLimit":8589934592,"uploadPartSize":20971520,"password":"●●●●●●●●"}' \
            --compressed
          
          robiR Offline
          robiR Offline
          robi
          wrote on last edited by
          #3

          @fbartels Thanks for this.. the two main things are retention beyond the options available and a possibly more dynamic schedule (thanks to your API example).

          One system we have is doing hourly local backups to keep important content from being lost, which is a lot, however there isn't a retention config that fits the needs. Hence a custom setting would be peachy.

          Once remote backups begin, some of those destinations have storage limitations and again the retention needs adjusting to keep within those limits w/o doubling costs, etc..

          The only other thing that would be missing is more data on size of backups directly so it doesn't have to be figured out via other indirect means (like looking back from remote backup sources how much is used, we should know how much is intended to be written.)

          Conscious tech

          fbartelsF 1 Reply Last reply
          0
          • robiR robi

            @fbartels Thanks for this.. the two main things are retention beyond the options available and a possibly more dynamic schedule (thanks to your API example).

            One system we have is doing hourly local backups to keep important content from being lost, which is a lot, however there isn't a retention config that fits the needs. Hence a custom setting would be peachy.

            Once remote backups begin, some of those destinations have storage limitations and again the retention needs adjusting to keep within those limits w/o doubling costs, etc..

            The only other thing that would be missing is more data on size of backups directly so it doesn't have to be figured out via other indirect means (like looking back from remote backup sources how much is used, we should know how much is intended to be written.)

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

            @robi so the change you need is rather a retention based on backup size?

            robiR 1 Reply Last reply
            0
            • fbartelsF fbartels

              @robi so the change you need is rather a retention based on backup size?

              robiR Offline
              robiR Offline
              robi
              wrote on last edited by robi
              #5

              @fbartels

              o Happyness level 1 - custom static retention
              o Happyness level 2 - custom dynamic retention based on backup size, yes
              o Happyness level 3 - custom dynamic retention based on level 2 with thresholds AND different destinations (of different sizes, including local)

              Conscious tech

              fbartelsF 1 Reply Last reply
              0
              • robiR robi

                @fbartels

                o Happyness level 1 - custom static retention
                o Happyness level 2 - custom dynamic retention based on backup size, yes
                o Happyness level 3 - custom dynamic retention based on level 2 with thresholds AND different destinations (of different sizes, including local)

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

                @robi retention by time you could already set through keepWithinSecs i would say.

                For the rest (although i would rather recommend to work on the storage limitations) maybe it would be an alternative to backup the Cloudron to disk and have another application pick up the moving to storage and rotation/retention part. There was a restic how to here recently that could help.

                robiR 1 Reply Last reply
                3
                • fbartelsF fbartels

                  @robi retention by time you could already set through keepWithinSecs i would say.

                  For the rest (although i would rather recommend to work on the storage limitations) maybe it would be an alternative to backup the Cloudron to disk and have another application pick up the moving to storage and rotation/retention part. There was a restic how to here recently that could help.

                  robiR Offline
                  robiR Offline
                  robi
                  wrote on last edited by
                  #7

                  @fbartels Yes, hence the ask for a single place to
                  set it, so it's in use until changed and the change survives updates.

                  Conscious tech

                  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