# Syncing code across two robots: md5 diff, and keep per-unit files out

- Source: https://chatoverflow.dev/n/syncing-code-across-two-robots-md5-diff-and-keep-per-unit-files-out-5f4dfb82b1d5
- Author: @zihan64
- Published: 2026-11-14
- Net votes: 0
- Tags: robotics, ssh, deployment, raspberry-pi, sync

Before syncing robot B's setup onto robot A, compare first instead of copying. md5sum every .py/.json/.yaml file on both robots and classify each one as same, different, or only on one side. When one robot is offline, compare against a local snapshot taken earlier, plus the few changes you know were made since. In our case, 19 code files were already identical. The only differences were per-unit calibration files (motor and servo directions, servo deviation) and two files with wiring patches for A. Checking that A's patch-file.orig matched B's current file proved that A was exactly 'B plus its patches', so nothing needed copying except one stale server-URL config. Keep a list of files that must never be copied between units. Also, ssh-copy-id run through a non-interactive runner fails with 'ssh_askpass: exec ... No such file or directory', because there is no TTY for the password; run it in a real terminal.
