Skip site navigation (1)Skip section navigation (2)
Date:      Thu, 21 May 1998 17:06:55 -0700 (PDT)
From:      Donald Burr <dburr@POBoxes.com>
To:        Emmanuel Gravel <egravel@elr346.ateng.az.honeywell.com>
Cc:        scsi@FreeBSD.ORG
Subject:   RE: Jaz or SyJet as backup drive
Message-ID:  <XFMail.980521170655.dburr@POBoxes.com>
In-Reply-To: <35600E72.504CE9E4@elr346.ateng.az.honeywell.com>

next in thread | previous in thread | raw e-mail | index | archive | help
This message is in MIME format
--_=XFMail.1.2.p0.FreeBSD:980521170655:29525=_
Content-Type: text/plain; charset=us-ascii

-----BEGIN PGP SIGNED MESSAGE-----

My secret spy satellite informs me that on 18-May-98, Emmanuel Gravel
wrote:

> Has anyone used a Jaz or SyJet drive as a backup device (instead of
> a tape drive)?  This is an option I'm considering, understanding the
> lowering costs of both drive and media of these devices, and the 
> close-to-harddrive speeds they have.  I'm wondering if the software
> can use them effectively.

I've been using a Jaz drive for a while as my backup media.  It works
pretty well.  I've hacked together a custom backup script that I use, that
does compressed backups using dump.  I'm including it here (since it is
fairly small) so that yourself (and others) may find some use for it.  It
shouldn't require much modification, and I believe that I put comments in
to indicate where modification might be needed for your local setup.

Feel free to contact me with any questions, and enjoy!
- ---
Donald Burr <dburr@POBoxes.com> - Ask me for my PGP key | PGP: Your
WWW HomePage: http://DonaldBurr.base.org/  ICQ #1347455 | right to
Address: P.O. Box 91212, Santa Barbara, CA 93190-1212   | 'Net privacy.
Phone: (805) 957-9666    FAX: (800) 492-5954            | USE IT.

-----BEGIN PGP SIGNATURE-----
Version: 2.6.2

iQCVAwUBNWTBn/jpixuAwagxAQGsEwP/U51xbnHqeKAebiHjxP7hXbSncOgUzMnt
qy6WrfMZmFaIsPoNbyjaZr78jzU97XAUGE7V5pWDuFgysfFNGTAaMmkgGGAeLZnh
3QnEzqmmiQ7HK1OdFTmew25nMotpDMBhyD5AevXbHmC3ViVDAeUT2A1K+S/NWKDl
N1jlrrclfYM=
=xhQJ
-----END PGP SIGNATURE-----

--_=XFMail.1.2.p0.FreeBSD:980521170655:29525=_
Content-Disposition: attachment; filename="dobackup"
Content-Transfer-Encoding: 7bit
Content-Description: my backup script
Content-Type: text/plain; charset=us-ascii; name=dobackup; SizeOnDisk=2908

#!/bin/sh

### CONFIGURATION SECTION

# Backup DOS files?
BACKUPDOSFILES="NO"

# What file(s)/dir(s) in the DOS partition do you want to backup?
# (specify paths relative to /dos)
# DFILES="config.sys autoexec.bat arcade local/*.bat progra~1/quicken/donald.* "
DFILES="config.sys autoexec.bat local/*.bat"

# Where do you want to put the backup file?  It will be named
# "dos.tar.gz" and will be located at this directory.
DFILELOC="/usr"

### END OF CONFIGURATION SECTION

if [ -f /tmp/dobackup.lock ]
then
	echo -n "Hmm, another dobackup process seems to be running.  "
	PID=`cat /tmp/dobackup.lock`
	echo "(pid=${PID})"
	echo "You can't run more than one at a time!"
	echo "(Note: if this is incorrect, rm the file /tmp/dobackup.lock)"
	exit 1
fi

echo $$ > /tmp/dobackup.lock
echo "Starting the weekly backup cycle."
echo ""
echo "NOTE: This will work better if you have the machine in single-user mode."
echo "      But this is not a requirement."
echo ""

if [ x"${BACKUPDOSFILES}" = x"YES" ]
then

if [ ! -d "${DFILELOC}" ]
then
	echo "ERROR: ${DFILELOC} does not exist and can't be used as the"
	echo "       location for the DOS backup files.  Re-edit this script"
	echo "       and take a look at the definition of DFILELOC, and be"
	echo "       sure that that directory exists!"
	rm -f /tmp/dobackup.lock
	exit 1
fi

echo -n "Backing up the DOS files..."
cd /dos
tar czf ${DFILELOC}/dos.tar.gz ${DFILES} > /tmp/dos-backup.log 2>&1

if [ $? -ne 0 ]
then
	echo "ERROR"
	echo ""
	echo "ERROR: backup failed for some reason.  Take a look at the log"
	echo "       file /tmp/dos-backup.log for more details."
	rm -f /tmp/dobackup.lock
	exit 1
fi

echo "done"
echo ""
rm -f /tmp/dos-backup.log

else

echo "Skipping backup of DOS files."
echo ""

fi

if ! df | grep "\/jaz$" > /dev/null 2>&1
then
	echo "WARNING: The backup device is not mounted.  Please mount it"
	echo "         before proceeding."
	rm -f /tmp/dobackup.lock
	exit 1
fi

echo -n "Removing old backups..."
rm -f /jaz/*.dgz
echo "done."
echo ""

for FSYS in / /usr /usr/local /var /var/news /home
do
	if [ "X${FSYS}" = "X/" ]
	then
		BKUPFILE="root"
	else
		BKUPFILE="`echo ${FSYS} | sed 's/\///g'`"
	fi
	BKUPFILE="/jaz/${BKUPFILE}.dgz"
	echo "Now backing up ${FSYS} as ${BKUPFILE}..."
	DUMPCMD="dump -0au -f - ${FSYS}"
	echo "Running: ${DUMPCMD} | gzip -9 > ${BKUPFILE}"
	echo ""
	${DUMPCMD} | gzip -9 > ${BKUPFILE}
	if [ $? -eq 0 ]
	then
		echo ""
		echo "Dump finished with NO errors."
		echo ""
		echo "Ready to proceed with next dump."
		echo ""
	else
		echo ""
		echo "*** THERE WAS (WERE) AN ERROR(S) IN THE DUMP!! ***"
		echo "PLEASE DO NOT PROCEED UNTIL ERRORS HAVE BEEN CORRECTED."
		echo "THIS SCRIPT WILL NOW TERMINATE."
		rm -f /tmp/dobackup.lock
		rm -f ${DFILELOC}/dos.tar.gz
		exit 1
	fi
done

echo "All dumps are complete."
echo ""
echo "See you next week!"
rm -f /tmp/dobackup.lock
rm -f ${DFILELOC}/dos.tar.gz
exit 0

--_=XFMail.1.2.p0.FreeBSD:980521170655:29525=_--
End of MIME message

To Unsubscribe: send mail to majordomo@FreeBSD.org
with "unsubscribe freebsd-scsi" in the body of the message



Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?XFMail.980521170655.dburr>