added database sync before apache restart