Store stat_result in the DB to build a snapshot from the db at startup, compatible with watchdog snapshot. Run once at startup and trigger standard events
Continously store the sequence ID to restart from same place after crash
Fix move, rename
Make sure a same path is never inserted twice in the DB.