Page is a not externally linkable
cookiemonster - 2:49 am on May 22, 2010 (gmt 0)
Hi,
I recently found this script on a website - it backs up all files on my GoDaddy website. I run it with Cron daily - works wonderfully.
The problem is, the tar.gz files produced by the script are corrupt. Is there any obvious reason for this, or any way to fix it? Or perhaps the script can be modified to simply copy the files, and not gzip them.
Thanks in advance for any help - here's the shell script:
#!/bin/bash
TERM=linux
export TERM
NOWDATE=`date +%m%d%y` # Sets the date variable format for zipped file: MMddyy
clear # clears terminal window
echo
echo "Hi, $USER!"
echo
echo "Beginning backup of files @ `date`"
echo
echo "Zipping directory structure..."
tar -cvzf $HOME/html/backups/dailyback/$NOWDATE.tar.gz $HOME/html/*
echo "Backup Complete!"