Keep a directory in step with a master copy.

App::FileSync keeps a directory on each client in step with one master copy on the server. Clients never talk to each other: each pushes its changes to the master and pulls everyone else's from it, so a change made on one client reaches the others on their next run.

Any number of clients can share a repo this way, and a separate machine can hold a replica of the master. Every run is a short-lived CLI process suitable for cron or the Windows Task Scheduler: there is no daemon, no database and no web interface.

   laptop  ──┐
   desktop ──┼──  push / pull  ──▶  master on the server
   tablet  ──┘                          │
                                        └──▶  replica (optional, pull-only)

Why it is built this way

A repo in six commands

Two machines are involved: the server, which holds the master, and each client, which holds a copy. Install App::FileSync on both. The example keeps the master in the server account's home directory, so nothing runs as root.

# on the server, once
filesync-admin --root ~/filesync repo create documents

# on the server, once: filesync-server needs the same --root
cat > ~/bin/filesync-server-home <<'EOF'
#!/bin/sh
exec /usr/local/bin/filesync-server --root "$HOME/filesync" "$@"
EOF
chmod +x ~/bin/filesync-server-home

# on each client, once
filesync init --repo documents --root /home/foo/Documents \
        --server foo@srv --server-command /home/foo/bin/filesync-server-home

# on each client, whenever you like
filesync sync --repo documents --dry-run
filesync sync --repo documents

The client reports its host name as its id; there is nothing else to name. An id is not a login, and it does not divide the repo: every client of a repo syncs the whole tree.

Where to go next