Skip site navigation (1)Skip section navigation (2)
Date:      Fri, 23 Jan 2009 18:11:12 +0300
From:      Odhiambo Washington <odhiambo@gmail.com>
To:        bsd <bsd@todoo.biz>
Cc:        "freebsd-questions@freebsd.org" <freebsd-questions@freebsd.org>
Subject:   Re: Backup program on FreeBSD for DLT drive
Message-ID:  <991123400901230711v63cfb21co160c6d4de0a28e8c@mail.gmail.com>
In-Reply-To: <1B33B4FC-D369-42C5-B0EF-4F213E2F2FD0@todoo.biz>
References:  <1B33B4FC-D369-42C5-B0EF-4F213E2F2FD0@todoo.biz>

Next in thread | Previous in thread | Raw E-Mail | Index | Archive | Help
On Thu, Jan 22, 2009 at 10:30 PM, bsd <bsd@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



Want to link to this message? Use this URL: <http://docs.FreeBSD.org/cgi/mid.cgi?991123400901230711v63cfb21co160c6d4de0a28e8c>