Backup program on FreeBSD for DLT drive
Odhiambo Washington
odhiambo at gmail.com
Fri Jan 23 07:11:14 PST 2009
On Thu, Jan 22, 2009 at 10:30 PM, bsd <bsd at 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
More information about the freebsd-questions
mailing list