should_force_full() threshold may be suboptimal for low-volume mail servers
Environment:
- Mail-in-a-Box v73
- Ubuntu 22.04
- S3 backup target
Description:
should_force_full() seems to trigger a full backup on weekends only when cumulative incremental size exceeds 50% of the last full backup. On low-volume mail servers where daily incrementals are small relative to the full backup size, this threshold may never be reached in practice. Without a time-based fallback, the incremental chain can grow indefinitely against an increasingly old full backup.
Steps to reproduce:
- Configure MIAB with S3 backup target on a low-volume mail server
- Allow backups to run for an extended period
- Observe that no full backup is triggered automatically despite the incremental chain growing over time
Potential fix:
In management/backup.py, should_force_full() around line 166:
if weekend:
if inc_size > .5*bak["size"]:
return True
+ if first_full_date + datetime.timedelta(days=90) < datetime.datetime.now(dateutil.tz.tzlocal()):
+ return True
return False
It would be helpful if the specific threshold value could be user-configurable. Ideally though the UI, or potentially through a custom.yaml for power users.
It is noted that:
- a custom YAML config likely goes against the design principles of the project
- The use case for smaller volume mail systems also likely occurs more with implementations that do not have significant engineering support to deploy 'under the hood' customisations, so a userland backup setting for "force full backup every N" might be an appropriate solution.
should_force_full()threshold may be suboptimal for low-volume mail serversEnvironment:
Description:
should_force_full()seems to trigger a full backup on weekends only when cumulative incremental size exceeds 50% of the last full backup. On low-volume mail servers where daily incrementals are small relative to the full backup size, this threshold may never be reached in practice. Without a time-based fallback, the incremental chain can grow indefinitely against an increasingly old full backup.Steps to reproduce:
Potential fix:
In
management/backup.py,should_force_full()around line 166:It would be helpful if the specific threshold value could be user-configurable. Ideally though the UI, or potentially through a
custom.yamlfor power users.It is noted that: