rsync
NAME
rsync — sync files between local and remote tray runtimes
SYNOPSIS
rsync [options] <src> <dest>
DESCRIPTION
Syncs files between the local VFS and a remote tray runtime's VFS over the WebRTC data channel. One side must always be local — remote-to-remote transfers are not supported. File operations are serialized as filesystem requests sent through the tray data channel, with binary content encoded as base64.
The sync algorithm walks both source and destination trees, compares file sizes and modification times, and transfers only files that are new or have changed. Files already up to date are skipped.
PATH FORMAT
Local paths are normal VFS paths (e.g. /workspace, /shared/project). Remote paths use runtimeId:/path syntax, where the runtime ID is the identifier shown by host for each connected follower or leader.
The short form r: can be used as the runtime ID when only one follower is connected. For example, r:/workspace resolves to the sole connected follower's /workspace.
OPTIONS
-
--dry-run,-nShow what would be transferred without actually doing it. Prints a summary of adds, updates, and deletes, then exits.
-
--deleteDelete files in the destination that do not exist in the source. Without this flag, extra files on the destination side are left untouched.
-
--verbose,-vShow detailed per-file output, including files that were skipped because they are already up to date.
DIRECTION
The direction of sync is determined by which argument contains the remote path specifier (the colon syntax):
-
Push (local → remote)
The source is a local path and the destination is a remote path. Files are read locally and written to the remote runtime.
-
Pull (remote → local)
The source is a remote path and the destination is a local path. Files are read from the remote runtime and written locally.
Remote-to-remote sync (both arguments using runtimeId: syntax) is not supported and will produce an error.
REQUIREMENTS
An active tray connection is required. If no tray is connected, rsync exits with an error. Use host to verify connection state and view available runtime IDs before syncing.
EXAMPLES
Push an entire workspace to a follower:
rsync /workspace follower-abc123:/workspace
Pull a project directory from a remote runtime:
rsync follower-abc123:/workspace/project /workspace/project
Preview what a sync would do without transferring anything:
rsync --dry-run -v /workspace r:/workspace
Push shared files and remove anything on the remote that no longer exists locally:
rsync --delete /shared leader:/shared
SEE ALSO
tray, host, mount