How to Use rsyncy: A Status Progress Bar for rsync

Aug 11, 2022 | Programming

Are you tired of the standard command line output when using rsync? Say hello to rsyncy, a powerful wrapper that gives your file transfers a snazzy status progress bar! In this guide, we’ll cover everything you need to know to get started, troubleshoot common issues, and milk all the benefits from this fantastic tool.

Status Bar Breakdown

The status bar is your best friend while transferring files. It gives you real-time feedback on your data transfer. Here’s what to expect in the status bar:

  • Progress bar: Displays the percentage of the total transfer, for example, [########################::::::] 80%.
  • Bytes transferred: Tells you how much data has been moved (e.g., 19.17G).
  • Transfer speed: Indicates the current speed of the transfer (e.g., 86.65MB/s).
  • Elapsed time: Shows how long the transfer has been running (e.g., 0:03:18).
  • Number of files transferred: Displays the total number of files processed (e.g., #306).
  • The spinner: This icon indicates whether rsync is still checking for updates—watch as the progress bar fluctuates while new files are found.

Installation

Ready to plunge into the world of rsyncy? Here’s how to install it on various platforms:

  • macOS and Linux: Use Homebrew with the following command:
    brew install rsyncy
  • Download: Grab the latest version for Linux or macOS from the official releases page.
  • Using pipx: If you prefer Python’s packaging, you can install rsyncy via pipx:
    pipx install rsyncy

Usage

Using rsyncy is a breeze! Here’s the simple command you need to run:

rsyncy -a FROM TO

Don’t forget, rsyncy works by passing the same arguments to rsync internally, meaning it will intelligently insert necessary options like –info=progress2 and -hv, so you don’t have to. For advanced users, you can also pipe output from rsync to rsyncy:

rsync -a --info=progress2 -hv FROM TO | rsyncy

There’s just one option in rsyncy: disable colors if you’d like by running it with NO_COLOR=1.

Known Issues When Using SSH Behind Rsync

SSH issues arise when using rsyncy because SSH requires direct TTY access for secure input, which can interfere with the status bar. If you encounter this problem, simply connect to your server via SSH once to add it to the known_hosts file. You’ll then be able to enter your password without hassle, despite the status bar overlay.

LF Support

If you are a fan of terminal file managers like lf, you can use rsyncy-stat to view status outputs directly:

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 setup shows the copy progress immediately while rsync is running—what a time-saver!

Development

For developers, you can record an rsync transfer using pipevcr and then replay it in rsyncy for debugging purposes. A great way to streamline your development process!

Troubleshooting

If you encounter any hiccups while using rsyncy, consider these troubleshooting tips:

  • Double-check your command syntax—missed flags or arguments can lead to unexpected behavior.
  • If the status bar is behaving erratically, ensure that your SSH setup is correct, as previously mentioned.
  • Try running in a different terminal environment to see if the issue persists.
  • Consult the available documentation or user forums for additional insights.

For more insights, updates, or to collaborate on AI development projects, stay connected with fxis.ai.

At fxis.ai, we believe that such advancements are crucial for the future of AI, as they enable more comprehensive and effective solutions. Our team is continually exploring new methodologies to push the envelope in artificial intelligence, ensuring that our clients benefit from the latest technological innovations.

Stay Informed with the Newest F(x) Insights and Blogs

Tech News and Blog Highlights, Straight to Your Inbox