Feature/db maint script replication

Is it worth it merging this for clusters ?