Hi,

I would like to share the following backup script being used by me. Works Fine. 
Just in case some one needs it.

My /home is 40 GB abd tar.gz file comes to 20 GB and takes about 1 hour 10 mins 
to create.

My question is - Is there faster way to take the backup?


#!/bin/bash
#Daily Backup Script for backing up /home
echo Time backup started = $(date +%T)
before="$(date +%s)"
datestamp="$(date)"
tempdate="$(date +%F)"
tar -zcvf /backupfilename.tar.gz /home 2> /root/logs/DAILYBACKUP_$tempdate.log

# Calculates and outputs total time take
after="$(date +%s)"
elapsed="$(expr $after - $before)"
hours=$(($elapsed / 3600))
elapsed=$(($elapsed - $hours * 3600))
minutes=$(($elapsed / 60))
seconds=$(($elapsed - $minutes * 60))
echo  "Home Folder Backup -" $datestamp " - Time Taken $hours hours $minutes 
minutes $seconds seconds" >> /root/logs/dailybackup.log
echo "- - - - - - - - - - - - - - - - - -" >> /root/logs/dailybackup.log



      Connect more, do more and share more with Yahoo! India Mail. Learn more. 
http://in.overview.mail.yahoo.com/

_______________________________________________
ilugd mailinglist -- [email protected]
http://frodo.hserus.net/mailman/listinfo/ilugd
Archives at: http://news.gmane.org/gmane.user-groups.linux.delhi 
http://www.mail-archive.com/[email protected]/

Reply via email to