On Thu, Jan 22, 2009 at 10:30 PM, bsd <b...@todoo.biz> wrote:

> Hello,
>
>
> I am using a FreeBSD server 7.0 as a Samba server and wanted to backup this
> server using Quantum DLT tape.
>

less /scripts/backup2tape.sh
#!/bin/sh
  TARGET=/dev/nsa0
# FILESYSTEMS=/:/var:/usr
  FILESYSTEMS=/
  DUMPLEVEL=0
  DUMPOPTIONS=auL
  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}
(END)

PS: Customize it by changing the TARGET and the FILESYSTEMS
As regards "security", store it safely in a bank safe:-)
I use it with cron, but I can re-install the server in minutes.



-- 
Best regards,
Odhiambo WASHINGTON,
Nairobi,KE
+254733744121/+254722743223
_ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _
"The only time a woman really succeeds in changing a man is when he is a
baby."
                             - Natalie Wood
_______________________________________________
freebsd-questions@freebsd.org mailing list
http://lists.freebsd.org/mailman/listinfo/freebsd-questions
To unsubscribe, send any mail to "freebsd-questions-unsubscr...@freebsd.org"

Reply via email to