Images lost after restore from backup (very old discourse install)

You weren’t supposed to do this by hand.

Try

rails c
OnceoffLog.where(job_name: "PostUploadsRecovery").count