backup.sh

So here is my problem: i have created an backup script for my root server, it is saving several things at once and suddently i didn't get an reporting email from my crontab anymore.
as far as i could track it down the script is working and cron is sending several mails for other jobs it is performing, so i'm a bit in a mess. :-( please help me out, here is my script:

Quote by backup.sh#!/bin/bash
USER='USER-NAME'
PASSWD='USER-PASS'
IP='FTP-Server-IP'
/bin/echo '# Building slash image'
/usr/bin/rsync -axz --exclude "/home/" --exclude "/usr/portage/" --exclude "/proc/" --exclude "/root/.ccache/" --exclude "/sys" --exclude "/dev" --exclude "tmp/" /* /home/backup
/bin/echo '# Building /boot/ image -> /home/backup/boot/boot.img'
/bin/dd if=/dev/md1 of=/home/backup/boot/boot.img
/bin/echo '# Building /home/services/ backup'
/bin/mkdir /home/backup/home/
/usr/bin/rsync -axz /home/services /home/backup/home
/bin/echo '# Building backup.tgz'
cd /home/backup
/bin/tar cfz /home/backup.tgz ./
/bin/echo '# md5sum:'
/usr/bin/md5sum /home/backup.tgz
/bin/echo '# Uploading to Backup-FTP'
/usr/bin/ncftpput -DDu ${USER} -p ${PASSWD} ${IP} ./ /home/backup.tgz
/bin/echo '# Cleaning up'
/bin/rm -rf /home/backup*
/bin/echo '# All done!'


many thanks for your help!
Comments
2
there'S an error
#welcome to the matrix
Back to top