Fixed bug on replication: backup didn't flush indexes