Code:
#!/bin/sh
TARGET=/dev/sa0
FILESYSTEMS=/:/var:/usr:/home
DUMPLEVEL=0
DUMPOPTIONS=au
MTACTION=rewind
MT=/usr/bin/mt
SED=/usr/bin/sed
DUMP=/sbin/dump
#Rewind the tape
echo "${MT} ${MTACTION}"
${MT} ${MTACTION}
#Do the dump for each file system
for i in `echo $FILESYSTEMS | ${SED} 's/:/ /g'`
do
echo "${DUMP} ${DUMPLEVEL}${DUMPOPTIONS}f ${TARGET} $i"
${DUMP} ${DUMPLEVEL}${DUMPOPTIONS}f ${TARGET} $i
done
#Rewind the tape
echo "${MT} ${MTACTION}"
${MT} ${MTACTION}
Copy n' paste that into notepad, save as fullbackup.sh, then copy it to incrementalbackup.sh. Open incrementalbackup.sh and change DUMPLEVEL=0 to =1
Make sure TARGET=/dev/sa0 is correct target for your tape drive - it should be listed in dmesg - set target to /dev/[whatever it's listed as in dmesg]
Upload both files as ascii to your server.
Use Cron to schedule when you want them to run, or just SSH in, su to root, and run manually...
sh fullbackup.sh
or
sh incrementalbackup.sh
Make sure your tape drive has enough capacity to hold the entire filesystems that are listed as FILESYSTEMS=
See http://www.freebsddiary.org/dump-restore.php#restore