Date: Wed, 26 Apr 2000 09:18:43 -0400 From: Ian Cartwright <ICartwright@IT.RJF.com> To: "FreeBSD Questions (E-mail)" <freebsd-questions@FreeBSD.ORG> Subject: Script help Message-ID: <6D5097D4B56AD31190D50008C7B1579B670269@EXLAN5>
next in thread | raw e-mail | index | archive | help
Hi! I need a little help with a simple script. I come from the MS-DOS word, so I constructed this script like a batch file, but as soon as it executes the first command it stops... If some kind soul would point me in the right direction, I would appreciate it. None the shell scripting tutorials I have found on the Web appear to cover what I am trying to do... Here's the script: #!/bin/sh # -*- sh -*- PATH=/usr/bin:/bin; export PATH # This is the backup script that backs up the entire # server to tape every night... #erase the tape echo "Erasing the tape..."$n exec /usr/bin/mt -f /dev/rsa0 erase 0 #turn compression on exec /usr/bin/mt -f /dev/rsa0 comp on #backup the root filesystem echo "Backing up /"$n exec /sbin/dump -0 -a -u -b 1000 -f /dev/nrsa0 / #backup the var filesystem echo "Backing up /var"$n exec /sbin/dump -0 -a -u -b 1000 -f /dev/nrsa0 /var #backup the usr filesystem echo "Backing up /usr"$n #exec /sbin/dump -0 -a -u -b 1000 -f /dev/nrsa0 /usr #rewind the tape exec /usr/bin/mt -f /dev/rsa0 rewind #eject the tape echo "Ejecting tape..."$n exec /usr/bin/mt -f /dev/rsa0 offline echo "Backup Complete!"$n #All done! Ian Cartwright Senior Engineer Raymond James Associates icartwright@it.rjf.com To Unsubscribe: send mail to majordomo@FreeBSD.org with "unsubscribe freebsd-questions" in the body of the message
Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?6D5097D4B56AD31190D50008C7B1579B670269>