# rsyncy { repos: [github.com/laktak/rsyncy](https://github.com/laktak/rsyncy/), [codeberg.org/laktak/rsyncy](https://codeberg.org/laktak/rsyncy) } A status/progress bar for [rsync](https://github.com/WayneD/rsync). ![gif of rsyncy -a a/ b](https://raw.githubusercontent.com/wiki/laktak/rsyncy/readme/demo.gif "rsyncy -a a/ b") - [Status Bar](#status-bar) - [Usage](#usage) - [Installation](#installation) - [Using ssh behind rsync (solved)](#using-ssh-behind-rsync-solved) - [lf (TUI) support](#lf-tui-support) - [Development](#development) ## Status Bar ``` [#######:::::::::::::::::::::::] 25% | 100.60M | 205.13kB/s | 0:00:22 | #3019 | 69% (4422..) [########################::::::] 82% | 367.57M | 508.23kB/s | 0:00:44 | #4234 | 85% of 5055 files ``` The status bar shows the following information: Description | Sample --- | --- (1) Progress bar with percentage of the total transfer | `[########################::::::] 80%` (2) Bytes transferred | `19.17G` (3) Transfer speed | `86.65MB/s` (4) Elapsed time since starting rsync | `0:03:18` (5) Number of files transferred | `#306` (6) Files
- percentage completed
- `*` spinner and `..` are shown while rsync is still scanning | `69% (4422..) *`
`85% of 5055 files` The spinner indicates that rsync is still looking for files. Until this process completes the progress bar may decrease as new files are found. ## Usage `rsyncy` is a wrapper around `rsync`. - You run `rsyncy` with the same arguments as it will pass them to `rsync` internally. - You do not need to specify any `--info` arguments as rsyncy will add them automatically (`--info=progress2 -hv`). ``` # simple example $ rsyncy -a FROM/ TO ``` Alternatively you can pipe the output from rsync to rsyncy (in which case you need to specify `--info=progress2 -hv` yourself). ``` $ rsync -a --info=progress2 -hv FROM/ TO | rsyncy ``` At the moment `rsyncy` itself has only one option, you can turn off colors via the `NO_COLOR=1` environment variable. ## Installation rsync is implemented in Go. For legacy reasons there is also a Python implementation that is still maintained. Both versions should behave exactly the same. ### Install/Update Binaries ``` curl https://laktak.github.io/rsyncy.sh|bash ``` This will download the rsyncy binary for your OS/Platform from the GitHub releases page and install it to `~/.local/bin`. You will get a message if that's not in your `PATH`. You probably want to download or view the [setup script](https://laktak.github.io/rsyncy.sh) before piping it to bash. If you prefer you can download a binary from [github.com/laktak/rsyncy/releases](https://github.com/laktak/rsyncy/releases) manually and place it in your `PATH`. ### Install via Homebrew (macOS and Linux) For macOS and Linux it can also be installed via [Homebrew](https://formulae.brew.sh/formula/rsyncy): ```shell $ brew install rsyncy ``` ### Install via Go ```shell $ go install github.com/laktak/rsyncy/v2@latest ``` ### Install on Arch/AUR For example with paru: ```shell $ paru -S rsyncy ``` ### Build from Source ```shell $ git clone https://github.com/laktak/rsyncy $ rsyncy/scripts/build # binary can be found here $ ls -l rsyncy/rsyncy ``` ## Using ssh behind rsync (solved) ssh uses direct TTY access to make sure that the input is indeed issued by an interactive keyboard user (for host keys and passwords). For this reason rsyncy now leaves one blank line between the output and the status bar. ## lf (TUI) support `rsyncy-stat` can be used to view only the status output on [lf](https://github.com/gokcehan/lf) (or similar terminal file managers). Example: ``` cmd paste-rsync %{{ opt="$@" set -- $(cat ~/.local/share/lf/files) mode="$1"; shift case "$mode" in copy) rsyncy-stat -rltphv $opt "$@" . ;; move) mv -- "$@" .; lf -remote "send clear" ;; esac }} ``` This shows the copy progress in the `>` line while rsync is running. If you have downloaded the binary version you can create it with `ln -s rsyncy rsyncy-stat`. ## Development First record an rsync transfer with [pipevcr](https://github.com/laktak/pipevcr), then replay it to rsyncy when debugging.