Actions::Katello::SyncPlan::Run tasks were deleted

Problem:
This is RH Satellite 6.11 and I already have a support ticket open, but it’s not getting very good response.

Expected outcome:
Restore the now deleted sync tasks.

As part of another support ticket, I was instructed to execute:

# foreman-rake foreman_tasks:cleanup TASK_SEARCH='label = Actions::Katello::SyncPlan::Run' STATES='stopped,paused,running,planning,planned,scheduled' VERBOSE=true

At the time I did not realize that this would effectively disable all 9 of the sync plans that I have defined.

I’ve tried toggling the plans to disabled and back to enabled but that throws the error:

ERF28-1357 [ForemanTasks::RecurringLogicCancelledException]: Cannot update a cancelled Recurring Logic.

I have a solution for that (rake script), but it still does not resolve the sync plan scheduling. There is no entry in the “Next Sync” column for any of the 9 sync plans. All are listed as “enabled”.

I see there are backups located under /var/lib/foreman/tasks-backup/yyyymmdd/ consisting of 4 CSV files. A grep through these and I see the sync plan runs that were deleted. Is there any means to restore these from the backup?

I initiated a manual sync via a shell script calling hammer.

RH support has not been helpful.

What was the point of the backup of these tasks if there is no means to restore them?