[ENG-11311](https://linear.app/comm/issue/ENG-11311/fix-uploading-compaction-after-restoring-backup).
It was easier than I initially thought; not sure why this condition was missing initially.
This solution is not ideal; there is still a minor chance for edge cases where logs are uploaded for the previous backup, to be specific, there is still minor chance for edge-case where logs athe interval after restore and before uploaded for the previous backup,ding new compaction. tThere are three ways of mitigating this, created a follow-up task: [](ENG-11340](https://linear.app/comm/issue/ENG-11340/avoid-replacing-backup-logs-after-restore).