Support

Akeeba Backup for Joomla!

#42785 Only keep 10 backups (i.e.)

Posted in ‘Akeeba Backup for Joomla! 4 & 5’
This is a public ticket

Everybody will be able to see its contents. Do not include usernames, passwords or any other sensitive information.

Environment Information

Joomla! version
5.4.3
PHP version
8.3
Akeeba Backup version
10.3.1

Latest post by nicholas on Tuesday, 10 March 2026 05:08 CDT

seagul30

Hi,

I have 

  • Enable maximum backup age quotas = yes
  • Maximum backup age, in days = 3 days
  • Don't delete backups taken on this day of the month = 1

However, over the time, the storage space at the server gets full.

Is there any chance to combine this setting with the count quota setting?
This would be really helpful, I have this problem with quite a few clients.
They don't need backups older than i.e. 1 year or 6 months. but the last three days is just not enough.

And the "first-of-the-month" backups fill up the storage.

Do you have any support on how to solve this!

Thanks a lot and best regards
Sigrid

 

System Task
system
The ticket information has been edited by Sigrid Gramlinger (seagul30).

nicholas
Akeeba Staff
Manager

Retention policies beyond the very simple and common use cases already implemented in Akeeba Backup become incredibly difficult to express using settings, as evidenced by Amazon S3's object retention policies. You end up with something that's either user-hostile, or resembling a programming language.

However, if you go down the latter route, you can always use Rclone in CRON jobs on your computer to implement any kind of arbitrary and/or conditional file retention policy.

For example, deleting files over 6 months old on a remote storage you've set up in Rclone as example and specifically in a folder within it called mybackups is as simple as running rclone delete example:mybackups --min-age 6M

You can go as complicated as you want. Let's say you want to implement the policy "delete files 6 months or older if and only if the total size of the files contained in the mybackups directory is over 100 GiB". You could do it with a shell script like this:

#!/usr/bin/env bash
REMOTE="example:mybackups"
THRESHOLD=$((100 * 1024**3)) # 100 GiB in bytes

# Get total size (bytes) of files
size=$(rclone lsjson --files-only -R "$REMOTE" | \
  jq -r '[.[] | select(.IsDir==false) | .Size] | add // 0')

if [ "$size" -gt "$THRESHOLD" ]; then
  rclone delete "$REMOTE" --min-age 6M -v
fi

The good thing about using rclone is that it can run on your computer, or any server, and it can support any kind of complexity in your retention rules. You could do totally crazy things like copying the backups taken on the 1st of each month into a separate cold storage area (presumably something cheap and enduring, akin to Glacier), removing files older than 3 months from primary cool storage and files older than 10 years from the secondary cold storage. There are use cases for this kind of retention.

The good news is that Rclone is a very mature project with loads of documentation and discussions on-line which means that asking any LLM for help implementing a complicated retention policy will result in a neat Bash script you can readily use. The most difficult part of the process is trying to describe what your backup retention policy should do.

Nicholas K. Dionysopoulos

Lead Developer and Director

🇬🇷Greek: native 🇬🇧English: excellent 🇫🇷French: basic • 🕐 My time zone is Europe / Athens
Please keep in mind my timezone and cultural differences when reading my replies. Thank you!

seagul30

Ok. Thanks for all the details.

I will definitely check rclone. If I could run that on my computer or my server, then that would work.
Thanks!

nicholas
Akeeba Staff
Manager

If you run it on your server for sure. Rclone is a single self-contained binary. Even if you do not run your own server, you can download the Linux binary from https://rclone.org/downloads/, upload it, and run it.

Nicholas K. Dionysopoulos

Lead Developer and Director

🇬🇷Greek: native 🇬🇧English: excellent 🇫🇷French: basic • 🕐 My time zone is Europe / Athens
Please keep in mind my timezone and cultural differences when reading my replies. Thank you!

Support Information

Working hours: We are open Monday to Friday, 9am to 7pm Cyprus timezone (EET / EEST). Support is provided by the same developers writing the software, all of which live in Europe. You can still file tickets outside of our working hours, but we cannot respond to them until we're back at the office.

Support policy: We would like to kindly inform you that when using our support you have already agreed to the Support Policy which is part of our Terms of Service. Thank you for your understanding and for helping us help you!