Dunno. Baffling the heck out of me. I could have sworn that it worked fine earlier today. Now I changed -czvf to -zvcf and it works. That can't be the trouble, could it?
Error messages are so
cryptic sometimes, aren't they?
Here's the complete script as it stands now.
PHP Code:
#!/bin/bash
# - bup.sh
# - A script to backup scripts
#
# - Glenn A. Johnson - November 27, 2011
# - Last edited March 24, 2012
#
BACKUP_DIR="/mnt/disk3/backup"
BACKUP_NAME="scripts-`date +%Y%m%d`.tar.gz"
#
# - Must be root user to run script
#
if [[ $EUID -ne 0 ]] ; then
echo "You need to run this script with root permissions"
exit 1
fi
#
# - Source my include files
. includes
. scolors
#
# - Run the backup archiving all files in the current folder
#
tar -zvcf $BACKUP_DIR/$BACKUP_NAME *
#
# - Finish up and exit
echo -e ${txtgrn}"Backup file ${txtred}$BACKUP_NAME ${txtgrn}created.\nScript run completed."${txtrst}
exit 0