On config replication - Binary editting?

Hello, this is my first post in this forum.
I currently have 2 MKs, one rb450 and one rb1200 and my intention is to have one as a backup from the other (active-passive). I know I could use CARP/VRRP to accomplish this at a gateway/network level, but still couldn’t find something to keep synchronized the rest of the configurations.

Here is what I’ve done so far:

A very ugly script that takes the configuration, mangles it with sed and other things, uploads it, uploads all the keys and certificates needed and reboots the “slave”. This is not very elegant solution, it doesn’t feel right. I have to cherry pick which branches of the configuration to export in order to avoid duplicate IPs or the configuration file failing to restore. Also, the script stops working if I start to use something not considered in those branches.

I’m now approaching from a different angle:

I’ve found out that doing a backup (/system backup) and restoring it on another router works, even if both have different hardware. This creates an issue with the names of the interfaces as well as the “disabled” state. I obviously want the interfaces or addresses to be disabled in the router I’m restoring the backup to. To workaround this issue, I think it would be possible to edit the binary backup, to rename the interfaces and set the disable bit where needed.

For instance, doing a binary diff from one backup where one interface is enabled and one where it’s not, I see there is a change at the position 0x000054D0 . I guess this is the ether4 config portion.

Uploaded with ImageShack.us

Is there any documentation about the binary format, that allows me to calculate with a level of certainty the offsets for the data I need to modify?
Does anybody have any experience with this sort of thing?
Is there an obvious way to keep the router’s configs replicated I’m missing?
I’m too wrong trying to mess with the binary?

Thanks in advance.

Isn’t this sort of what MilliScript is for? http://forum.mikrotik.com/t/milliscript-freeware-to-manage-export-configuration-files/36187/1
It’s not binary editing but it is exported configuration management.