Backup retention policy, backup limit, and backup delete in the CLI

Hi Sebastian,

Would it be possible to implement a retention policy for backups? Currently 10 backups are allowed. If you for instance have business with data that changes frequently on a daily basis then you will most likely need to create a backup at least once per day.

I’ve seen these types of solutions in other places - I think for example Azure has this so that you can set a retention policy of x number of days before your blobs are automatically deleted/purged.

For Squidex I’m thinking something simple; allow 30 backups and when you’re reaching the limit an email notification can be sent; like how it works for API call limit notifications.

30 maybe sounds much and I understand that that would incur more cost for you but at the same time I do not think that people would abuse it or anything. So maybe just remove the 10 limit altogether and it would solve the problem.

Also, something that is somewhat related is the backup command in the CLI. A backup delete command could be added and that would be great but I doubt a lot of people would use it. In this case one could automate backups by using a combination of backup delete and backup create, by running the commands in sequence.

What are your thoughts on the above?

I would store the backup somewhere else anyway.

What do you mean? ,.

I mean: If you use the backups to actually backup you system (not the apps), I would store them somewhere else, not in the system you want to backup.

ok. That is not what i am trying to achieve.

This is what Im trying to do:

  1. Create a backup using the Squidex CLI in an Azure Function
  2. Take that .zip file and store it in an Azure Storage Account

This works fine, I’ve already implemented it.

This is the best solution anyway, I would say. Btw. the CLI has a feature to delete the backup: squidex-samples/cli/Squidex.CLI/Squidex.CLI/Commands/App_Backup.cs at master · Squidex/squidex-samples · GitHub

Thanks, I just found it actually and ran it and it works perfectly:

.\sq.exe backup create --deleteAfterDownload backup.zip

This actually solves this feature request!

1 Like

--help in the CLI usually works good as well.

1 Like