WINDOWS to READYNAS/LINUX: Measuring Backup Speeds Across Network

Backing up using RSYNC and CP across a network (maybe you have a mapped share somewhere) its hard to see the Transfer speed. So to get a feel for it jump on the destination machine (readynas or linux) and use tool like cbm or iftop to get an idea of the speed.

On Windows:
Note the bottom right is the how I setup the backup job on windows to copy to the NAS.
I mounted a share on windows to a drive - mapped a drive using 
net use v: //nas-or-linux-ip-or-hostname/backupshare /USER:username
when asked for password put the password you gave for username on the NAS or Linux server
Then use rsync to copy from Windows to Linux. To get rsync you can install cygwin on Windows. Open up cygterminal when its done and realize all your drive letters - local and mapped are in the following directory: /cygdrive
rsync -avh /cygdrive/c/stuffneedtobackup /cygdrive/v/destinationfolder
note it will make the destination folder if it is missing - you can also add the ability to log to a file like this:
rsync -avh --log-file=/cygdrive/v/logfile.txt /cygdrive/c/stuffneedtobackup /cygdrive/v/destinationfolder
If the backup stops/fails just redo the command it will start where it left off.

On NAS/Linux:
To see transfer speeds across the network get on ssh of the destination machine (Nas or linux)
apt-get update
apt-get install iftop
apt-get install cbm
Open one shell with ssh to remote machien
cbm
Then open another shell
iftop -i eth0
Explanation of output in the pictures

cbm keys:
b to switch between bits and bytes
+ or - to change update interval

iftop keys:
? to get in and out of help
T shows cumulative transfer in units of bytes (not speed) since the iftop program started
P to pause the screen
p to show ports
1,2,3 toggle which column to sort by
j,k 
to scroll up and down
S,s to show source port
D,d to show destination port
N,n toggle showing name resolution for ip address / port numbers

NOTE: S,D and N toggle showing a Port or Source and weather to do Name resolution on host/port or not. When its a capital letter its refering to the Port settings and when its lower case its refering to the host. Capital letters are achieved by holding Shift.So capital letter S, D, N are Show Sorrce Port, Show Dest. Port, Resolve Port name respectively. Lower case letters s,d,n are show source host, show dest host, resolve host ip or not

iftop # explanation:
137 MB 533 kb 509 kb 587 kb
137 total cumulative if T was pressed
533 kb/s in the last 2 seconds
509 kb/s in the last 10 seconds
587 kb/s in the last 40 seconds
At the bottom you will cumulatives of the 2,10 and 40 seconds intervals, also you will see peak speeds and cumulative transfers for everything
Note everything is in human readable

For more info on cbm and iftop google them.




Another cool way is with IPFM



Comments