From owner-freebsd-questions Wed Apr 26 6:18:53 2000 Delivered-To: freebsd-questions@freebsd.org Received: from exmta1.rjf.com (exmta1.rjf.com [170.12.8.119]) by hub.freebsd.org (Postfix) with ESMTP id A875F37BC1D for ; Wed, 26 Apr 2000 06:18:50 -0700 (PDT) (envelope-from ICartwright@IT.RJF.com) Received: by EXMTA1 with Internet Mail Service (5.5.2448.0) id ; Wed, 26 Apr 2000 09:18:46 -0400 Message-ID: <6D5097D4B56AD31190D50008C7B1579B670269@EXLAN5> From: Ian Cartwright To: "FreeBSD Questions (E-mail)" Subject: Script help Date: Wed, 26 Apr 2000 09:18:43 -0400 MIME-Version: 1.0 X-Mailer: Internet Mail Service (5.5.2448.0) Content-Type: text/plain; charset="iso-8859-1" Sender: owner-freebsd-questions@FreeBSD.ORG Precedence: bulk X-Loop: FreeBSD.ORG 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