FC Code -- air-gapped sync

This tool allows to synchronise two directories on air-gapped machines. This is done by:

  1. calculating a hash for each file in the source directory and the destination directory;
  2. on the source machine, comparing the hashes and producing the commands and the data to update the destination directory;
  3. bringing these to the destination machine and running the update.

The main goal is to minimise the volume of files that has to be transferred between the machines: copies and renaming will be performed at the destination when possible, and each missing content is put in the updates only once.

Example

This is how to transfer directory src from machine A to dst on machine B.

On machine B:

cd dst
update_sums
cp -p sha1sums sha1sums_B

On machine A:

cd src
update_sums

cd .. # assuming there is enough room here
mkdir updates
prepare_update src sha1sums_B updates

Get the generated update script and the updates directory to machine B, and there, run:

./update updates dst

Source code

air-gapped_sync-1.1.tgz. Get this test framework, if you want to run the tests. See the README for more information on dependencies, testing, installation and design.

These two are released under GPL.