View Full Version : Measuring backups

25-03-2010, 11:31 AM
I am building a new backup system and wondering if anyone has any ideas on how to measure how long it takes
Currently i use rsync and have been experimenting with xxcopy but as the backup takes place at night i cannot think of any way to measure how long it takes except stay in and watch it??

Can anyone think of a way or use a different method that i could try?


25-03-2010, 11:37 AM
Where is the backup going. Eg: another PC / Server Via a LAN, to an External Drive, or off site to another location Via the web?

Depending on where its going will depend on its speed, over the WAN, will be slower than a LAN or External drive. ??

25-03-2010, 11:46 AM
It is going across a network from a Fedora server to either another fedora (rsync) or a windows pc on a gigabit

25-03-2010, 12:04 PM
Use a wrapper script to log a timestamp at start & finish

25-03-2010, 01:34 PM
You mean add in the cron job to create a log or txt file with the time on it, one at the start and one at the finish?

EDIT: one at the end as i know when it is starting

25-03-2010, 01:45 PM
Well, it sounds like you have a cron job that calls the rsync binary directly?

create a script that contains:
your existing rsync call with it's options

then the command to log a timestamp, maybe like:
date > /var/log/backup_finish_time

then set your cron job to call the script rather than rsync.

25-03-2010, 01:52 PM
I will check that out and give it a shot
It looks good


26-03-2010, 08:17 AM
Well i successfully got xxcopy to create a txt file using the /Fo<filename> switch
and the time the file is created can be seen from the date modified column

I will work on rsync next week on this using Fred Fish's method
Just thought i would post this for future reference


Rod J
26-03-2010, 11:23 AM
I use Gadmin-Rsync (http://gadmintools.flippedweb.com/index.php?option=com_content&task=view&id=51&Itemid=38) which is a GUI front-end for the rsync binary and it produces a script that includes time stamping and output to a log. This is my example Linux Documents backup script:


START_TIME=`date +%Y-%m-%d_%H:%M:%S`;
if [ ! -e '/media/Data/Linux_Backup/Documents' ]; then
echo -n Missing_destination_path:_ >> /var/log/gadmin-rsync/gadmin-rsync-Linux-Documents.log
rsync --archive --human-readable --verbose --stats --log-file=/var/log/gadmin-rsync/gadmin-rsync-Linux-Documents.log.details '/home/rod/Documents/' '/media/Data/Linux_Backup/Documents'

if [ $? -eq 0 ] && [ $MISSING_PATH -eq 0 ]; then
STOP_TIME=`date +%Y-%m-%d_%H:%M:%S`;
echo "$START_TIME $STOP_TIME Backup successful: Source: [/home/rod/Documents/] Destination: [/media/Data/Linux_Backup/Documents]" >> /var/log/gadmin-rsync/gadmin-rsync-Linux-Documents.log
STOP_TIME=`date +%Y-%m-%d_%H:%M:%S`;
echo "$START_TIME $STOP_TIME Backup failure: Source: [/home/rod/Documents/] Destination: [/media/Data/Linux_Backup/Documents]" >> /var/log/gadmin-rsync/gadmin-rsync-Linux-Documents.log

That script might give you an idea how to modify your rsync script to time the backup.