• Stars
    star
    116
  • Rank 297,276 (Top 6 %)
  • Language
    Python
  • License
    MIT License
  • Created over 3 years ago
  • Updated 4 months ago

Reviews

There are no reviews yet. Be the first to send feedback to the community and the maintainers!

Repository Details

A status/progress bar for rsync

rsyncy

A status/progress bar for rsync.

gif of rsyncy -a a/ b

Status Bar

[########################::::::]  80% |      19.17G |      86.65MB/s | 0:03:18 | #306 | scan 46% (2410)\

The status bar shows the following information:

Description Sample
Progress bar with percentage of the total transfer [########################::::::] 80%
Bytes transferred 19.17G
Transfer speed 86.65MB/s
Elapsed time since starting rsync 0:03:18
Number of files transferred #306
Files to scan/check
- percentage completed
- (number of files)
- spinner
scan 46% (2410)\

The spinner indicates that rsync is still checking if files need to be updated. Until this process completes the progress bar may decrease as new files are found.

Installation

Usage

rsyncy is a wrapper around rsync.

  • You run rsyncy with the same arguments as it will pass them to rsync internally.
  • Do not specify any --info arguments, rsyncy will automatically add --info=progress2 and -hv internally.
# 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.

Known Issue when using ssh behind rsync

ssh uses direct TTY access to make sure that the input is indeed issued by an interactive keyboard user (for host keys and passwords). That means that rsyncy does not know that ssh is waiting for input and will draw the status bar over it. You can still enter your password and press enter to continue.

Workaround: connect once to your server via ssh to add it to the known_hosts file.

lf support

rsyncy-stat can be used to view only the status output on 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, then replay it to rsyncy when debugging.

More Repositories

1

extrakto

extrakto for tmux - quickly select, copy/insert/complete text without a mouse
Shell
806
star
2

vanilla-chrome

Vanilla Cookie Manager is a Whitelist Manager that helps protect your privacy. Automatically removes unwanted cookies.
JavaScript
106
star
3

chkbit-py

Check the data integrity of your files over time
Python
64
star
4

js-graphy

Graphing Calculator that evals JavaScript
JavaScript
46
star
5

pipenv-shebang

shebang for pipenv scripts
Python
23
star
6

todd

todd is an interactive console TODO-list manager with VI key bindings for `todo.txt`
Python
21
star
7

pipevcr

Like asciinema but for pipes
Python
13
star
8

chkbit

goto chkbit-py
JavaScript
10
star
9

coffeescript-be-gone

No more CoffeeScript ;) - Atom package
JavaScript
9
star
10

npp-hjson

Hjson support for Notepad++
7
star
11

curlshell

Serve your bash scripts over HTTP for Docker
JavaScript
7
star
12

spacefox

Manage browser tabs: each window is a space that can be closed and restored on demand
JavaScript
6
star
13

urwid_viedit

Edit widget supporting vi-mode for https://github.com/urwid/urwid
Python
5
star
14

vs-smartfind

SmartFind Hack for Visual Studio
C#
4
star
15

atom-vs-syntax

Atom version of the VisualStudio Theme from Sublime by Mihai Ciuraru.
CSS
3
star
16

textgrep

Extract multiline regex matches from text
JavaScript
3
star
17

stroustrup

The missing stroustrup();
C
3
star
18

hed

Pure JSON with comments when editing
JavaScript
3
star
19

discourse-sso

Single Sign On for Discourse with Active Directory
C#
3
star
20

sublime-oddly

Adds a command to split your selection into lines where only every 2nd/3rd/.. line is added.
Python
3
star
21

wundermilk

Convert your tasks from 🐮 RTM (remember the milk) to ⭐ Wunderlist
JavaScript
2
star
22

termplug

A plugin to preview images and videos from the terminal
Swift
2
star
23

atom-scrolly

abandoned - do you want to take over?
JavaScript
2
star
24

consul-haproxy-dyconf

Docker container running HAProxy, dynamically updates from Consul using dyconf
JavaScript
1
star
25

dyconf

Dynamic configuration template rendering
JavaScript
1
star
26

mac-asksec

Test Mac Permissions from the Terminal
Swift
1
star