From owner-freebsd-questions@FreeBSD.ORG Fri Jun 17 14:34:45 2005 Return-Path: X-Original-To: freebsd-questions@freebsd.org Delivered-To: freebsd-questions@freebsd.org Received: from mx1.FreeBSD.org (mx1.freebsd.org [216.136.204.125]) by hub.freebsd.org (Postfix) with ESMTP id E4E3216A41C for ; Fri, 17 Jun 2005 14:34:45 +0000 (GMT) (envelope-from jtriende@wisc.edu) Received: from smtp4.wiscmail.wisc.edu (hermes.doit.wisc.edu [144.92.197.190]) by mx1.FreeBSD.org (Postfix) with ESMTP id B468A43D4C for ; Fri, 17 Jun 2005 14:34:45 +0000 (GMT) (envelope-from jtriende@wisc.edu) Received: from avs-daemon.smtp4.wiscmail.wisc.edu by smtp4.wiscmail.wisc.edu (iPlanet Messaging Server 5.2 HotFix 2.04 (built Feb 8 2005)) id <0II800205GHJUA@smtp4.wiscmail.wisc.edu> for freebsd-questions@freebsd.org; Fri, 17 Jun 2005 09:34:31 -0500 (CDT) Received: from [128.104.10.240] by smtp4.wiscmail.wisc.edu (iPlanet Messaging Server 5.2 HotFix 2.04 (built Feb 8 2005)) with ESMTPSA id <0II8006Y1GHICS@smtp4.wiscmail.wisc.edu>; Fri, 17 Jun 2005 09:34:30 -0500 (CDT) Date: Fri, 17 Jun 2005 09:34:27 -0500 From: James Riendeau In-reply-to: To: Wojciech Puchar Message-id: MIME-version: 1.0 Content-type: text/plain; charset=US-ASCII Content-transfer-encoding: 7BIT User-Agent: Microsoft-Entourage/10.1.6.040913.0 X-Spam-Report: AuthenticatedSender=yes, SenderIP=0.0.0.0 X-Spam-PmxInfo: Server=avs-8, Version=4.7.1.128075, Antispam-Engine: 2.0.3.1, Antispam-Data: 2005.6.17.12, SenderIP=0.0.0.0 Cc: freebsd-questions@freebsd.org Subject: Re: FreeBSD/UNIX backups to DVD+RW 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, 17 Jun 2005 14:34:46 -0000 What I was doing did work fine for me; I just couldn't add multiple dumps to the same disk. It turns out this was the wrong way to do it. I'm not sure how a 32K block size would help. The -B4589840 I used tells dump that the 'tape' it will be writing to can hold 4589840 kb (4.37 Gs), the size of a standard dvd. Unfortunately, growisofs provides direct access to the DVD and dump does not use a ISO compliant file format, so growisofs cannot find the end of the last session (who knew? :). I was told the way to do this properly is to dump a partition to a file in say /tmp/fullbackup/, gzip it, and repeat until I have all the partitions. Then write /tmp/fullbackup to the dvd: (Note, I added -B10485760 to limit backups to 10 G's. You have to give dump some -B value or it will attempt to write out a catalog of standard size tapes. You should adjust this value to whatever meets your needs.) # dump -0 -uL -C16 -B10485760 -f /tmp/fullbackup/usr.dumpfull /usr # gzip /tmp/fullbackup/usr.dumpfull # dump -0 -uL -C16 -B10485760 -f /tmp/fullbackup/var.dumpfull /var # gzip /tmp/fullbackup/var.dumpfull # dump -0 -uL -C16 -B10485760 -f /tmp/fullbackup/home.dumpfull /home # gzip /tmp/fullbackup/home.dumpfull # dump -0 -uL -C16 -B10485760 -f /tmp/fullbackup/root.dumpfull / # gzip /tmp/fullbackup/root.dumpfull # growisofs -speed=4 -Z /dev/cd0 -J -R /tmp/fullbackup If you're pressed for space, you can do the above, but write each file to the dvd before removing the gzipped dump file and creating the next one. The first file would be written with the -Z (new session) option, then the rest with the -M (append) option instead. If this still takes too much space, I suppose you could try to pipe the dump directly to gzip, but I couldn't figure out how. If anybody knows, please reply. To do a restore, I found the following works: - Recreate the partition (in my case this would involve playing with gmirror first in the event of catastrophic disk/system failure) - cd into the mounted partition (ex, cd /usr) - mount the backup dvd and restore: # cd /usr # mount -t cd9660 /dev/ /cdrom # restore -rfv -P 'gunzip -c /cdrom/usrfullbackupfilename.gz' But don't take my word for it, you should always do a test restore (into /tmp if necessary if you haven't any blank hard drives handy) before a catastrophic event happens to make sure the process works smoothly. Thanks to all those who replied, - James Riendeau I'm posting this to the list for posterity's sake. In case someone else has this problem, they will have full instructions at their disposal, provided they can find it. On 6/17/05 4:56 AM, "Wojciech Puchar" wrote: >> I'm trying to setup backups to the DVD-RW drive on our new server before it >> goes into production. I've got the DVD-RW drive working, and I figured out >> how to dump to it: >> >> # dvd+rw-format /dev/cd0 >> # dump -0 -uL -C16 -B4589840 -P 'growisofs -speed=4 -Z /dev/cd0=/dev/fd/0' >> /usr >> > > with both DVD+RW and DVD-RW i was able to write DIRECTLY to /dev/ under > NetBSD if only blocks were 32k > > should be possible with FreeBSD too. > >> A test restore comes out clean: >> >> # restore -Nxvb /dev/cd0 >> >> The problem is most of the partitions are tiny (< 1G) and I would like to >> fit more then one partition on each DVD. I figured just passing -M (append >> data) instead of -Z (new session) would do it: >> >> # dump -0 -uL -C16 -a -P 'growisofs -speed=4 -M /dev/cd0=/dev/fd/0' /home >> >> But growisofs fails with :-( /dev/cd0 doesn't look like isofs..., and of >> course dump fails with "Broken pipe". >> >> Any clues to how to get this to work? (Webpage link is sufficient if there >> is something out there. I couldn't find one.) >> >> I'm fairly new to the FreeBSD/UNIX world, so please be gentle. >> >> Thanks, >> >> -james >> >> >> >> _______________________________________________ >> freebsd-questions@freebsd.org mailing list >> http://lists.freebsd.org/mailman/listinfo/freebsd-questions >> To unsubscribe, send any mail to "freebsd-questions-unsubscribe@freebsd.org" >>