From owner-freebsd-questions@FreeBSD.ORG Fri Jan 23 15:11:14 2009 Return-Path: Delivered-To: freebsd-questions@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34]) by hub.freebsd.org (Postfix) with ESMTP id E0E4810656C3 for ; Fri, 23 Jan 2009 15:11:13 +0000 (UTC) (envelope-from odhiambo@gmail.com) Received: from mail-fx0-f11.google.com (mail-fx0-f11.google.com [209.85.220.11]) by mx1.freebsd.org (Postfix) with ESMTP id 44E4B8FC08 for ; Fri, 23 Jan 2009 15:11:12 +0000 (UTC) (envelope-from odhiambo@gmail.com) Received: by fxm4 with SMTP id 4so1312269fxm.19 for ; Fri, 23 Jan 2009 07:11:12 -0800 (PST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=gamma; h=domainkey-signature:mime-version:received:in-reply-to:references :date:message-id:subject:from:to:cc:content-type; bh=KPOq2F7nuisq3UD2q7/E8bJCPew9RNRRGzM2BBQv7kM=; b=GWFmsxSzEoOO4+FF+aEGNV+HFs98teyWgOvART8QA8KhjmDmPEHkIYlfNgke5A2QuB 4TGQWZo4flAr1BXEIByGsu97ix3rzuPBXFqPrPwFNS0Lb7P1kQJGYugAoCaEHMAQXVKm 115/vnMK1A9MliAsO3B+U9fgBb5R3UfByteMo= DomainKey-Signature: a=rsa-sha1; c=nofws; d=gmail.com; s=gamma; h=mime-version:in-reply-to:references:date:message-id:subject:from:to :cc:content-type; b=tsOUlmMt+cxm/HXuvFJShreJQxqapEaAvLV3ZsEBlXT9nPrs5FAhWLPHbn4uWD9wZE A/uJWk4LcWuMhnAW+Nx8v9jBjZpXj7860ylCLLhbTNG89+KVt4nuALDFhqlENvha0vG2 zOHSP0LGFRpRz4gfbvExE5A0nSbZbC87iu3JI= MIME-Version: 1.0 Received: by 10.223.116.77 with SMTP id l13mr107446faq.106.1232723472143; Fri, 23 Jan 2009 07:11:12 -0800 (PST) In-Reply-To: <1B33B4FC-D369-42C5-B0EF-4F213E2F2FD0@todoo.biz> References: <1B33B4FC-D369-42C5-B0EF-4F213E2F2FD0@todoo.biz> Date: Fri, 23 Jan 2009 18:11:12 +0300 Message-ID: <991123400901230711v63cfb21co160c6d4de0a28e8c@mail.gmail.com> From: Odhiambo Washington To: bsd Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 7bit X-Content-Filtered-By: Mailman/MimeDel 2.1.5 Cc: "freebsd-questions@freebsd.org" Subject: Re: Backup program on FreeBSD for DLT drive X-BeenThere: freebsd-questions@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: User questions List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Fri, 23 Jan 2009 15:11:14 -0000 On Thu, Jan 22, 2009 at 10:30 PM, bsd 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