From owner-freebsd-questions@FreeBSD.ORG Sat Nov 21 14:33:12 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 850731065670 for ; Sat, 21 Nov 2009 14:33:12 +0000 (UTC) (envelope-from bernt@bah.homeip.net) Received: from feeder.usenet4all.se (1-1-1-38a.far.sth.bostream.se [82.182.32.53]) by mx1.freebsd.org (Postfix) with ESMTP id 712788FC12 for ; Sat, 21 Nov 2009 14:33:09 +0000 (UTC) Received: from kw.homeip.net (c80-217-70-227.bredband.comhem.se [80.217.70.227]) by feeder.usenet4all.se (8.13.1/8.13.1) with ESMTP id nALEX6Yi086259; Sat, 21 Nov 2009 15:33:07 +0100 (CET) (envelope-from bernt@bah.homeip.net) Message-ID: <4B07FA1D.4090302@bah.homeip.net> Date: Sat, 21 Nov 2009 15:33:01 +0100 From: Bernt Hansson User-Agent: slrn/1.0.8 (FreeBSD) MIME-Version: 1.0 To: George Davidovich References: <4B0562A4.5050405@bah.homeip.net> <4B056636.6050309@infracaninophile.co.uk> <4B075AAA.80205@bah.homeip.net> <20091121095251.GA63630@marvin.optimis.net> In-Reply-To: <20091121095251.GA63630@marvin.optimis.net> Content-Type: text/plain; charset=ISO-8859-1; format=flowed Content-Transfer-Encoding: 7bit Cc: freebsd-questions@freebsd.org Subject: Re: Dump 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: Sat, 21 Nov 2009 14:33:12 -0000 George Davidovich said the following on 2009-11-21 10:52: > On Sat, Nov 21, 2009 at 04:12:42AM +0100, Bernt Hansson wrote: >> Matthew Seaman skrev: >>> Bernt Hansson wrote: >>>> I've been testing backups with dump, works well BUT >>>> -L does not work. For example >>>> >>>> dump -0 -a -u -L -f /mnt/dump.home.full /dev/ad0s2d >>> I believe that you need to tell dump the mount point of the file >>> system in order for it to create a snapshot, rather than the device >>> file for the partition. (ie. snapshotting only makes sense on a >>> mounted read-write filesystem). > > Actually, the above isn't correct. A device special is fine. From the > dump(8) manpage: > > The file system to be dumped is specified by the argument filesystem > as either its device-special file or its mount point (if that is in a > standard entry in /etc/fstab). > > The criteria unique to live dumps is that /dev/ad0s2d must be already > mounted, and there must be a .snap directory in its root. You've since > changed your command, so I won't address what the problem might have > been. > >>> Also, if you're dumping a snapshotted FS to a local file, then bump >>> up the cachesize to improve performance a lot. Add '-C 32' to your >>> command-line. >> Ok. I've tested this >> dump -1 -a -u -L -C 64 -h 0 -f /usr/home/bernt/disk2/dump.backup.home.2 /usr/home > > Was the change from 'dump -0' to 'dump -1' intentional? Yes. > Dump levels are > rarely chosen to be sequential, but a level of 1 or greater is generally > performed after a level 0 dump. Yes. I've done a level 0 dump. >> The error is mksnap_ffs: Cannot create /usr/home/.snap/dump_snapshot: >> Invalid argument dump: Cannot create /usr/home/.snap/dump_snapshot: No >> such file or directory The directory exist. drwxrwx--- 2 root operator 512 16 Nov 19:19 .snap > You've now specified what's likely a directory (/usr/home), not a > device-special or mount point. Your choices of valid filesystems can be > determined by running df(1) and examining the first and last columns. > On a typical install those two columns might be: > > Filesystem Mounted on > /dev/ad0s1a / > devfs /dev # ignore this line > /dev/ad0s1e /tmp > /dev/ad0s1f /usr > /dev/ad0s1d /var > > Pick one. I prefer device names. This is from my original post dump -0 -a -u -L -f /mnt/dump.home.full /dev/ad0s2d ad0s2d is /usr/home > FWIW, if you're going to be using dump regularly (i.e. multiple dump > levels and/or multiple hosts) and dumping to files, I'd suggest a naming > convention of > > I am going to use it on a regular basis, at least that is my intention. If I can get the -L flag to work > hostname-20090405-usr-0 I see what you mean. But since I already have a script (tar) that takes care of that. > to save you the grief of date fragility, and give you a meaningful > display in 'ls -l' when restoring. So, for a level 0 dump on your > system, your commands might be: > > dumpdir=/home/bernt/disk2 > dump -0auL -C 64 -f $dumpdir/hostname-20091121-root-0 -h 0 / > dump -0auL -C 64 -f $dumpdir/hostname-20091121-usr-0 -h 0 /usr > dump -0auL -C 64 -f $dumpdir/hostname-20091121-var-0 -h 0 /var >