Can I generate binary logs if they weren't turned on?
Can we generate the logs for the few hour gap? Or are they gone?


They are gone. You cannot do a sync with that gap. However, it should not matter.

You need to setup replication from scratch on DB1.

During off-hours, run this on DB2

MYSQL_USER=root
MYSQL_PASS=rootpassword
MYSQL_CONN="-u${MYSQL_USER} -p${MYSQL_PASS}"
MYSQLDUMP_OPTIONS=""
MYSQLDUMP_OPTIONS="${MYSQLDUMP_OPTIONS} --master-data=1"
MYSQLDUMP_OPTIONS="${MYSQLDUMP_OPTIONS} --single-transaction"
MYSQLDUMP_OPTIONS="${MYSQLDUMP_OPTIONS} --routines"
MYSQLDUMP_OPTIONS="${MYSQLDUMP_OPTIONS} --triggers"
MYSQLDUMP_OPTIONS="${MYSQLDUMP_OPTIONS} --all-databases"
echo "SET SQL_LOG_BIN = 0;" &gt; MySQLData.sql
echo "STOP SLAVE;" &gt;&gt; MySQLData.sql
mysql ${MYSQL_CONN} -ANe"RESET MASTER;"
mysqldump ${MYSQL_CONN} ${MYSQLDUMP_OPTIONS} &gt;&gt; MySQLData.sql
echo "SET SQL_LOG_BIN = 1;" &gt;&gt; MySQLData.sql


You just setup replication on DB1 and load MySQLData.sql into it.

BTW Make sure log-slave-updates is configured on DB1 and DB2