Save result of last replication run in the database

Ticket:	#4553