14.5. 配置清理未使用的任务功能
Satellite 执行常规清理,以减少数据库中的磁盘空间,并限制磁盘增长率。因此,Satellite 备份可以更快地完成,整体性能越高。
默认情况下,Satellite 会执行 cron 作业,该作业每天的 19:45 清理任务。Satellite 在清理过程中删除以下任务:
- 成功运行和 30 天以上的任务
- 所有超过一年的任务
您可以使用这些选项配置清理未使用的任务功能:
要配置 Satellite 运行 cron 作业的时间,请将
--foreman-plugin-tasks-cron-line
参数设为您希望 cron 格式的时间。例如,要将 cron 任务调度到每天 15:00 运行,请输入以下命令:satellite-installer --foreman-plugin-tasks-cron-line "00 15 * * *"
# satellite-installer --foreman-plugin-tasks-cron-line "00 15 * * *"
Copy to Clipboard Copied! Toggle word wrap Toggle overflow -
要配置 Satellite 删除任务的周期,请编辑
/etc/foreman/plugins/foreman-tasks.yaml
文件中的:rules:
部分。 要在 Satellite 上禁用常规任务清理,请输入以下命令:
satellite-installer --foreman-plugin-tasks-automatic-cleanup false
# satellite-installer --foreman-plugin-tasks-automatic-cleanup false
Copy to Clipboard Copied! Toggle word wrap Toggle overflow 要在 Satellite 上重新启用常规任务清理,请输入以下命令:
satellite-installer --foreman-plugin-tasks-automatic-cleanup true
# satellite-installer --foreman-plugin-tasks-automatic-cleanup true
Copy to Clipboard Copied! Toggle word wrap Toggle overflow