Forum Home
Press F1
 
Thread ID: 108348 2010-03-24 22:31:00 Measuring backups Gobe1 (6290) Press F1
Post ID Timestamp Content User
869766 2010-03-24 22:31:00 Hi
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?

Thanks
Gobes
Gobe1 (6290)
869767 2010-03-24 22:37:00 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. ??
wainuitech (129)
869768 2010-03-24 22:46:00 It is going across a network from a Fedora server to either another fedora (rsync) or a windows pc on a gigabit Gobe1 (6290)
869769 2010-03-24 23:04:00 Use a wrapper script to log a timestamp at start & finish fred_fish (15241)
869770 2010-03-25 00:34:00 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
Gobe1 (6290)
869771 2010-03-25 00:45:00 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.
fred_fish (15241)
869772 2010-03-25 00:52:00 Thanks
I will check that out and give it a shot
It looks good

Cheers
Gobe1 (6290)
869773 2010-03-25 19:17:00 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

Gobes
Gobe1 (6290)
869774 2010-03-25 22:23:00 I use Gadmin-Rsync (gadmintools.flippedweb.com) 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:


#!/bin/sh

START_TIME=`date +%Y-%m-%d_%H:%M:%S`;
if [ ! -e '/media/Data/Linux_Backup/Documents' ]; then
MISSING_PATH=1
echo -n Missing_destination_path:_ >> /var/log/gadmin-rsync/gadmin-rsync-Linux-Documents.log
else
MISSING_PATH=0
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'
fi


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
else
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
fi


That script might give you an idea how to modify your rsync script to time the backup.
Rod J (451)
1