bublina

Love people, use things.

Minimal File Transfer

The goal of this article is to find an easy and minimal way to transfer recursive directory changes to a host which does not have git nor any other high-level tool like rsync.

Transfer should be done by netcat and on the other end the received data should be run by shell (straight from stdin after decompression).

$ diff -arq jasan-val1 jasan-val2
Only in jasan-val2: ahoj.txt
Only in jasan-val2: aoeui
Files jasan-val1/httpd.conf and jasan-val2/httpd.conf differ
Only in jasan-val1/nginx: nginx.sh
Only in jasan-val1: processmail.sh
Only in jasan-val1: processmail.sh-old
Only in jasan-val2/public_html: dir
Only in jasan-val1: var.tar.gz

Half-way through thinking about a solution I found something very similar, just too complicated for what I need:

Offline-rsync

The result is a script which requires only base64, tar, diff, patch, rm, and sh, all basic commands on POSIX systems.