mergeing db slave and master into one template