Rsync progress display during transfer
Rsync is a powerful tool to transfer files from one server to another or from one directory to another. To enable progress display while you transfer a file use the
--progress switch (double dash).
Quote:
--progress show progress during transfer
Example how to use rsync progress display
Code:
$ rsync --progress source:/tmp/file .
file
2,359,296 0% 1.07MB/s 0:14:39
---------
Syncronizing directories from a remote directory to local directory or vice-versa can be done using rsync.
Be default, rsync doesn't show a progress bar while transfering files.
Rsync with progress bar
Use the below syntax in order for rsync to display a progress bar:
Code:
$ rsync -r -v --progress -e ssh root@remote-server:~/pictures /home/user/
receiving file list ...
366 files to consider
pictures/IMG_1141.jpg
3849245 100% 32.30kB/s 0:01:56 (xfer#30, to-check=335/366)
pictures/IMG_1142.jpg
4400662 100% 32.21kB/s 0:02:13 (xfer#31, to-check=334/366)
pictures/IMG_1172.jpg
2457600 71% 32.49kB/s 0:00:29
in this case rsync used some arguments:
Quote:
-r, --recursive recurse into directories
-v, --verbose increase verbosity
-e, --rsh=COMMAND specify the remote shell to use (which in my case it was ssh)
--progress show progress during transfer
So basically, put --progress after your rsync command or you can create an alias like this:
Code:
$ alias rsync='rsync --progress'
$ alias rsync
alias rsync='rsync --progress'
You can add this alias to your ~/.profile and everytime you will be using rsync command, the progress bar will be shown durring file transfer.