1. Proposed title of this feature request Add automatic pruning for tasks-backup 2. What is the nature and description of the request? When using and having backup enabled it will by default make a backup first under /var/lib/foreman/tasks-backup and keep it there until someone manually cleans up the backups. 3. Why? - Enable cronjob with => # satellite-installer --foreman-plugin-tasks-automatic-cleanup true --foreman-plugin-tasks-cron-line "00 15 * * *" - Will follow the settings from /etc/foreman/plugins/foreman-tasks.yaml - Backup is enabled by default for /var/lib/foreman/tasks-backup - After a while /var/lib/foreman/tasks-backup will get very big 4. How to achieve this? - Add pruning interval for backups under /var/lib/foreman/tasks-backup to foreman-plugin-tasks-automatic-cleanup
Do you want backups to be kept by age or by a certain number of backups?
I think pruning/keeping backups via age will be better then via quantity
I'd very much like to see this additional functionality, please.
Thank you for your interest in Satellite 6. We have evaluated this request, and while we recognize that it is a valid request, we do not expect this to be implemented in the product in the foreseeable future. This is due to other priorities for the product, and not a reflection on the request itself. We are therefore closing this out as WONTFIX. If you have any concerns about this, please do not reopen. Instead, feel free to contact Red Hat Technical Support. Thank you.
Verified. Tested on Satellite 6.10.0 Snap 9.0 Setup: 1. To run tasks cleanup every 5mins, satellite-installer --foreman-plugin-tasks-cron-line '5 * * * *' Steps: 1. satellite-installer --foreman-plugin-tasks-backup true (which is default:false) 2. Verify TASK_BACKUP=true in /etc/cron.d/foreman-tasks (which is default:false) 3. Create any product or sync any repo to have a valid task. 4. Include this line "TASK_SEARCH='label = Actions::Katello::Product::Create'" to /etc/cron.d/foreman-tasks 5. Watch /var/log/foreman/cron.log for task cleanup of above labelled tasks. 6. Verify /var/lib/foreman/tasks-backup created and has details of cleaned up tasks. Observation: Using new flag --foreman-plugin-tasks-backup, No tasks are backup by default when cleaning up tasks from the database, and no /var/lib/foreman/tasks-backup created for backup tasks. And this flag is set to true when upgraded to 6.10, and tasks cleanup works as previously, and /var/lib/foreman/tasks-backup gets created for any tasks backup when cleaned up. Note: As per discussion with devs, this BZ covers only the cleanup part of /var/lib/foreman/tasks-backup, and not anything related to /var/lib/foreman-maintain/backup-tasks, so filed a new BZ for it, feel free to attach related cases to it. https://bugzilla.redhat.com/show_bug.cgi?id=1983622
Since the problem described in this bug report should be resolved in a recent advisory, it has been closed with a resolution of ERRATA. For information on the advisory (Moderate: Satellite 6.10 Release), and where to find the updated files, follow the link below. If the solution does not work for you, open a new bug report. https://access.redhat.com/errata/RHSA-2021:4702