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
  • Brite
  • 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. Feature Requests
  3. Retention policy - 1 day possible?

Retention policy - 1 day possible?

Scheduled Pinned Locked Moved Feature Requests
backupretention
6 Posts 3 Posters 72 Views 3 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.
  • D Offline
    D Offline
    djxx
    wrote last edited by
    #1

    Using Cloudron version 9, under Configure Backup Schedule & Retention is it possible to get an option for 1 day?

    I store my backups on a ZFS pool, so I automatically get daily, weekly, and monthly snapshots of my data. Having this as 2 days causes me to spend 2x the storage space (and bandwidth) on backups.

    1 Reply Last reply
    1
    • jamesJ Online
      jamesJ Online
      james
      Staff
      wrote last edited by
      #2

      Hello @djxx
      Currently, no. The minimum is two days.
      I am converting your topic into a feature request.

      1 Reply Last reply
      1
      • jamesJ james marked this topic as a regular topic
      • jamesJ james moved this topic from Support
      • girishG Offline
        girishG Offline
        girish
        Staff
        wrote last edited by
        #3

        This is possible via the API, just not via the UI.

        D 1 Reply Last reply
        1
        • girishG girish

          This is possible via the API, just not via the UI.

          D Offline
          D Offline
          djxx
          wrote last edited by
          #4

          @girish Great! Can you give an example of how, or point me to the documentation?

          1 Reply Last reply
          0
          • jamesJ Online
            jamesJ Online
            james
            Staff
            wrote last edited by
            #5

            Hello @djxx
            The API Documentation is still outdated.
            But I can guide you.
            Create yourself a Cloudron API Token, see https://docs.cloudron.io/profile#api-tokens

            Get your backup site ID

            export CLOUDRON_ACCESS_TOKEN="YOUR_TOKEN_GOES_HERE"
            curl "https://my.cloudron.dev/api/v1/backup_sites?page=1&per_page=1000&access_token=${CLOUDRON_ACCESS_TOKEN}"
            

            Example Output:

            {
              "backupSites": [
                {
                  "id": "3db47cce-dab7-46b6-9db3-1892ab14cd21",
                  "name": "default",
                  "provider": "filesystem",
                  "schedule": "00 00 23 * * *",
                  "format": "tgz",
                  "enableForUpdates": true,
                  "creationTime": "2025-10-10T08:12:57.000Z",
                  "ts": "2025-11-10T11:22:44.000Z",
                  "config": {
                    "backupDir": "/var/backups"
                  },
                  "limits": {
                    "memoryLimit": 1073741824,
                    "uploadPartSize": 10485760,
                    "syncConcurrency": 10,
                    "downloadConcurrency": 10,
                    "copyConcurrency": 10
                  },
                  "retention": {
                    "keepWithinSecs": 172800
                  },
                  "integrityKeyPair": {
                    "publicKey": "-----BEGIN PUBLIC KEY-----\nMCowBQYDK2VwAyEAZ18PRnLfQIf08IKl9bf9YkIHL7zT2eeeRJ8XuCx1+C0=\n-----END PUBLIC KEY-----\n"
                  },
                  "contents": null,
                  "encrypted": false,
                  "encryptedFilenames": false,
                  "encryptionPasswordHint": null
                }
              ]
            }
            

            So the backup site ID is 3db47cce-dab7-46b6-9db3-1892ab14cd21.

            Set the retention time in seconds:

            export BACKUPSITE_ID="3db47cce-dab7-46b6-9db3-1892ab14cd21"
            curl "https://my.cloudron.dev/api/v1/backup_sites/${BACKUPSITE_ID}/configure/retention?access_token=${CLOUDRON_ACCESS_TOKEN}" \
              -H 'content-type: application/json' \
              --data-raw '{"retention":{"keepWithinSecs":86400}}'
            

            This will lead to a little buggy looking dashboard since there is no display option for values outside of the avaiable selections.

            Normal 2 Days:
            821b8ddd-60a8-49f5-bc09-2b7759c67048-image.png

            Set to 86400 seconds = 1 Day:
            240788f1-b06c-408e-af32-4f346e3758d4-image.png

            D 1 Reply Last reply
            1
            • jamesJ james

              Hello @djxx
              The API Documentation is still outdated.
              But I can guide you.
              Create yourself a Cloudron API Token, see https://docs.cloudron.io/profile#api-tokens

              Get your backup site ID

              export CLOUDRON_ACCESS_TOKEN="YOUR_TOKEN_GOES_HERE"
              curl "https://my.cloudron.dev/api/v1/backup_sites?page=1&per_page=1000&access_token=${CLOUDRON_ACCESS_TOKEN}"
              

              Example Output:

              {
                "backupSites": [
                  {
                    "id": "3db47cce-dab7-46b6-9db3-1892ab14cd21",
                    "name": "default",
                    "provider": "filesystem",
                    "schedule": "00 00 23 * * *",
                    "format": "tgz",
                    "enableForUpdates": true,
                    "creationTime": "2025-10-10T08:12:57.000Z",
                    "ts": "2025-11-10T11:22:44.000Z",
                    "config": {
                      "backupDir": "/var/backups"
                    },
                    "limits": {
                      "memoryLimit": 1073741824,
                      "uploadPartSize": 10485760,
                      "syncConcurrency": 10,
                      "downloadConcurrency": 10,
                      "copyConcurrency": 10
                    },
                    "retention": {
                      "keepWithinSecs": 172800
                    },
                    "integrityKeyPair": {
                      "publicKey": "-----BEGIN PUBLIC KEY-----\nMCowBQYDK2VwAyEAZ18PRnLfQIf08IKl9bf9YkIHL7zT2eeeRJ8XuCx1+C0=\n-----END PUBLIC KEY-----\n"
                    },
                    "contents": null,
                    "encrypted": false,
                    "encryptedFilenames": false,
                    "encryptionPasswordHint": null
                  }
                ]
              }
              

              So the backup site ID is 3db47cce-dab7-46b6-9db3-1892ab14cd21.

              Set the retention time in seconds:

              export BACKUPSITE_ID="3db47cce-dab7-46b6-9db3-1892ab14cd21"
              curl "https://my.cloudron.dev/api/v1/backup_sites/${BACKUPSITE_ID}/configure/retention?access_token=${CLOUDRON_ACCESS_TOKEN}" \
                -H 'content-type: application/json' \
                --data-raw '{"retention":{"keepWithinSecs":86400}}'
              

              This will lead to a little buggy looking dashboard since there is no display option for values outside of the avaiable selections.

              Normal 2 Days:
              821b8ddd-60a8-49f5-bc09-2b7759c67048-image.png

              Set to 86400 seconds = 1 Day:
              240788f1-b06c-408e-af32-4f346e3758d4-image.png

              D Offline
              D Offline
              djxx
              wrote last edited by
              #6

              @james Thanks! This was helpful. I made this change. Looking forward to the next sync so I can see if the data has been cut in half.

              1 Reply Last reply
              1
              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