Mastering rsync: Compile and Sync Files on Embedded Boards Efficiently
This guide explains what rsync is, how to compile it for an ARM development board, configure it to avoid SIMD and other features, install the binary, and use rsync commands with options like -a, -v, -z, -u and --progress to efficiently synchronize files between the board and a PC.
What is rsync?
rsync (remote sync)is a file synchronization tool that can sync between local directories or between local and remote devices.
Unlike scp, rsync checks existing files on both sides and transfers only changed parts (by size or modification time).
Using rsync
Demonstration using a PC and a development board. Both sides must have rsync installed.
Note: Both the sender and receiver must have rsync installed.
The board lacks rsync, so we compile it from source.
Download rsync source from https://download.samba.org/pub/rsync/.
Extract, enter directory, create a temporary folder:
tar -xvf rsync-3.2.3.tar.gz
cd rsync-3.2.3/
mkdir tmpGenerate a cross‑compilation Makefile:
./configure --prefix=$PWD/tmp --host=arm-linux-gnueabihf CC=arm-linux-gnueabihf-gccIf errors occur, disable SIMD as shown by ./configure --help and add --disable-simd (or other disables) to the configure command.
./configure --prefix=$PWD/tmp --disable-simd --host=arm-linux-gnueabihf CC=arm-linux-gnueabihf-gccFurther errors may require disabling additional features:
./configure --prefix=$PWD/tmp --disable-simd --disable-openssl --disable-xxhash --disable-zstd --disable-lz4 --host=arm-linux-gnueabihf CC=arm-linux-gnueabihf-gccWhen configuration succeeds, a Makefile is generated.
Note: If more errors appear, adjust the configure options accordingly.
Compile and install:
make
make installThe compiled rsync binary appears in the tmp folder; copy it to the board’s /usr/bin:
scp rsync [email protected]:/usr/binDemonstration of rsync usage:
Create 100 files on the board, then sync to PC:
rsync -avzu --progress [email protected]:/root/test .-a: archive mode, preserves metadata. -v: verbose output. -z: compress data during transfer. -u: skip files that are newer on the receiver. --progress: show progress.
After creating another 100 files on the board, running the same command continues syncing only the new files.
This concludes the brief guide to using rsync for efficient file synchronization on embedded devices.
Open Source Linux
Focused on sharing Linux/Unix content, covering fundamentals, system development, network programming, automation/operations, cloud computing, and related professional knowledge.
How this landed with the community
Was this worth your time?
0 Comments
Thoughtful readers leave field notes, pushback, and hard-won operational detail here.
