Hack a custom backup Retention and Schedule
-
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.
-
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
-
@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.)
-
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) -
@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.