From owner-freebsd-questions@FreeBSD.ORG Wed Jan 16 16:42:50 2008 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 4EDFD16A41B for ; Wed, 16 Jan 2008 16:42:50 +0000 (UTC) (envelope-from jimbow@darq.net) Received: from farnborough.darq.net (fab.darq.net [82.136.41.2]) by mx1.freebsd.org (Postfix) with ESMTP id 0D66113C468 for ; Wed, 16 Jan 2008 16:42:49 +0000 (UTC) (envelope-from jimbow@darq.net) Received: from localhost (localhost [127.0.0.1]) by farnborough.darq.net (Postfix) with ESMTP id 039231D04E for ; Wed, 16 Jan 2008 16:43:10 +0000 (GMT) X-Virus-Scanned: amavisd-new at darq.net Received: from farnborough.darq.net ([127.0.0.1]) by localhost (farnborough.darq.net [127.0.0.1]) (amavisd-new, port 10024) with ESMTP id S4boWoZX7r9H for ; Wed, 16 Jan 2008 16:43:05 +0000 (GMT) Received: from troop.darq.net (hackney.darq.net [78.86.112.102]) (using TLSv1 with cipher DHE-RSA-AES256-SHA (256/256 bits)) (No client certificate requested) (Authenticated sender: zygis@darq.net) by farnborough.darq.net (Postfix) with ESMTP id 7C4C41CF2E for ; Wed, 16 Jan 2008 16:43:05 +0000 (GMT) Message-ID: <478E3403.6040609@darq.net> Date: Wed, 16 Jan 2008 16:42:43 +0000 From: Jim Bow User-Agent: Thunderbird 2.0.0.6 (X11/20071004) MIME-Version: 1.0 To: freebsd-questions References: <23ed14b80711210539w4bed1enc180f8e32ec76881@mail.gmail.com> <27dbfc8c0711210555h1a862f5drccb1a6f5bcb1a837@mail.gmail.com> <23ed14b80801160713q10606d2es21e869f935b22257@mail.gmail.com> In-Reply-To: <23ed14b80801160713q10606d2es21e869f935b22257@mail.gmail.com> Content-Type: text/plain; charset=ISO-8859-1; format=flowed Content-Transfer-Encoding: 8bit Subject: Re: Need help with backup shell script 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: Wed, 16 Jan 2008 16:42:50 -0000 Andreas Widerĝe Andersen wrote: > #!/bin/sh > > MOUNT=/external > DATE=`date +%Y%m%d%H%M` > > mount /dev/da0 $MOUNT #Change device name > find $MOUNT -mtime +30 -delete > mkdir $MOUNT/$DATE > rsync -rlpgoD /backup/ $MOUNT/$DATE > umount /external > > When I try to run my script I get this prompt back: > > mount: /dev/da0 on /external: incorrect super block This fails because you are trying to mount the raw(?) drive and mount is unable to detect what file system it is (by looking at the partition's super block). > Am I doing something wrong here or do I need to I need to use one of the > other from /dev: You want to use /dev/da0s1d - the main partition on slice 1 on the drive. Sorry, I dont remember the explanation as to why you must use da0s1d instead of da0s1c, but it goes something along the lines of c partition being a shorthand notation for the entire slice, whereas letter d marks the first partition on the slice. Maybe someone here can clarify this? Hope this helps. Jim Bow