On 29-Sep-2009, at 12:42 PM, Amit Sharma wrote:
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?
I use mirrordir. Once the first run is complete , it only takes a few
seconds to update the changes.
Regards,
Sameep
www.TuxDVDs.com
The Best Online Linux Distro Store
Latest Distros
Ubuntu Ultimate 2.3 Gamer Edition
Linux Mint 7 Xfce
Zenwalk Linux 6.2
#!/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 -- ilugd@lists.linux-delhi.org
http://frodo.hserus.net/mailman/listinfo/ilugd
Archives at: http://news.gmane.org/gmane.user-groups.linux.delhi
http://www.mail-archive.com/ilugd@lists.linux-delhi.org/
_______________________________________________
ilugd mailinglist -- ilugd@lists.linux-delhi.org
http://frodo.hserus.net/mailman/listinfo/ilugd
Archives at: http://news.gmane.org/gmane.user-groups.linux.delhi
http://www.mail-archive.com/ilugd@lists.linux-delhi.org/