Need RSYNC for an embedded device

it seems that rsync is too big and needs to many resources for an embedded system like this one:

DISTRIB_ID='OpenWrt'

DISTRIB_RELEASE='21.02.0'

DISTRIB_REVISION='r16279-5cc0535800'

DISTRIB_TARGET='ath79/generic'

DISTRIB_ARCH='mips_24kc'

DISTRIB_DESCRIPTION='OpenWrt 21.02.0 r16279-5cc0535800'

DISTRIB_TAINTS='no-all busybox'

it needs to be able to syncronize two folders one of which is a network share.

can anyone name something that will do this?

How much RAM in your device ? I used rsync in past on 128MB. But probably you also use Samba ?

But for a very, very basic sync, you will find shell scripts on the web.

@frollic: AFAIK, there is no rsync applet for busybox.

Yeah, I must have misinterpreted my Google.

here is the available memory:

          total        used        free      shared  buff/cache   available

Mem: 125984 30124 65408 480 30452 95076
Swap: 0 0 0

Your output missing something ..

This if from my Gl-Inet Creta some ath79 mobile router, with 128M RAM and 16M Flash I think.

root@creta-3:~# rsync  version 3.4.2  protocol version 32
Copyright (C) 1996-2026 by Andrew Tridgell, Wayne Davison, and others.
Web site: https://rsync.samba.org/
Capabilities:
    64-bit files, 64-bit inums, 64-bit timestamps, 64-bit long ints,
    no socketpairs, symlinks, symtimes, hardlinks, no hardlink-specials,
    no hardlink-symlinks, IPv6, atimes, batchfiles, inplace, append, ACLs,
    xattrs, optional secluded-args, no iconv, prealloc, stop-at, no crtimes
root@creta-3:~# df
Filesystem           1K-blocks      Used Available Use% Mounted on
/dev/root                 4608      4608         0 100% /rom
tmpfs                    60384      1940     58444   3% /tmp
/dev/mtdblock6            8704      2156      6548  25% /overlay
overlayfs:/overlay        8704      2156      6548  25% /
tmpfs                      512         0       512   0% /dev
root@creta-3:~# free 
              total        used        free      shared  buff/cache   available
Mem:         120768       47956       44924        1940       27888       33324
Swap:             0           0           0
root@creta-3:~#

I can easily see OP using a 8MB flash device, even something unsupported, here.

Filesystem 1K-blocks Used Available Use% Mounted on
rootfs 1472 492 980 33% /
/dev/root 13056 13056 0 100% /rom
tmpfs 62992 192 62800 0% /tmp
/dev/mtdblock5 1472 492 980 33% /overlay
overlayfs:/overlay 1472 492 980 33% /
tmpfs 512 0 512 0% /dev

that's unreadable, use the </> button on top of the message window when you paste cli output.

on 25.12 rsync requires an additional ~240kb of flash space -

sorry frollic….

well thank you for the replys so far, I managed to install rsync, but unfortunately i stumbled across a problem that is way worse now:

RSYNC does not seem to be able to “sync” it can just copy from source to destination but not vice versa. I do understand that it is possible to run it in a way that it copys from a-to-b and from b-to-a ati the same time but I need something that will also handle true bidirectional sync
conflict detection.

any ideas - or should i start a new topic?

rclone ? it says cloud hosts, but I'm pretty sure it can sync local folders too.
but it most def not going to fit your device.

there's also unison and osync, but none of them is available in openwrt.
osync seems to be shell script based, and can probably be made to work with openwrt.

Thank you so much - I shall have a look in to osync and would appreciate any more hints to possible leads :slight_smile: The main problem is that there is not much space available….

you should read README.md

A two way filesync script running on bash

A wrapper around rsync.

please read the manpage of rsync
i.e

--dry-run --delete
will help you

maybe the script allone