Date: Sat, 10 Aug 2002 00:58:09 -0700 From: "Jonas Fornander" <jonas@netwood.net> To: "'Matthew Seaman'" <m.seaman@infracaninophile.co.uk> Cc: "'freebsd-questions@FreeBSD.org'" <freebsd-questions@FreeBSD.ORG> Subject: RE: Dump questions Message-ID: <028b01c24043$ab3fb220$0800a8c0@master> In-Reply-To: <20020802074840.GB51805@happy-idiot-talk.infracaninophi>
next in thread | previous in thread | raw e-mail | index | archive | help
Matthew, Thank you very, very much for your thorough answer on my dump questions. I did read your previous posting which was very helpful too. The root system dumped fine but I run into some problems when I tried to dump /usr. After the dump started I was asked the following continuously: <snip> DUMP: Change Volumes: Mount volume #25 DUMP: Is the new volume mounted and ready to go?: ("yes" or "no") y DUMP: Volume 25 begins with blocks from inode 7531318 DUMP: Closing /bckup/usrdump/usr-20020809.dump </snip> I stopped the dumped at "Mount volume #35". At that time dump had created a 40MB file. However /usr is 1.2GB. 1. Is it correct that dump should ask all these "Mount volume" questions? 2. If so, is there a silent flag? I could not find one in the man pages. Jonas Fornander - System Administrator Netwood Communications, LLC - www.netwood.net Find out why we're better - 310-442-1530 > -----Original Message----- > From: owner-freebsd-questions@FreeBSD.ORG > [mailto:owner-freebsd-questions@FreeBSD.ORG] On Behalf Of > Matthew Seaman > Sent: Friday, August 02, 2002 12:49 AM > To: Jonas Fornander > Cc: 'freebsd-questions@FreeBSD.org' > Subject: Re: Dump questions > > > On Fri, Aug 02, 2002 at 12:05:15AM -0700, Jonas Fornander wrote: > > > If you dump a 50GB /usr file system that has only 2GB of > files in it > > to a second drive, does the second drive need to be 50GB too or can > > dump to a 20GB drive? > > That should work fine --- dump doesn't create huge images of > empty space, just the files, directories and metadata > sufficient to recreate the filesystem. > > > Do I need to create directories on the second drive (i.e. > > dump_of_root, dump_of_home etc..) or does dump create those > > automatically? > > It looks like you're trying to write out a dump archive as a > file into a second filesystem -- so the normal rules for > output to files apply. The path to the directory where you > want to write your dump archive must exist. > > If what you're trying to do is replicate the filesystem to > another drive, then you need to pipe the output of dump(1) > into restore(1). I wrote quite a long piece about doing that > in > http://www.freebsd.org/cgi/getmsg.cgi?fetch=3471062+3475577+/u > sr/local/www/db/text/2002/freebsd-questions/20020630.freebsd-questions > > > When I try to dump / to a second drive, I get the following error: > > #dump -0u -f /dev/ad2s1e / > > DUMP: Date of this level 0 dump: Thu Aug 1 23:48:19 2002 > > DUMP: Date of last level 0 dump: the epoch > > DUMP: Dumping /dev/ad0s1a (/) to /dev/ad2s1e > > DUMP: mapping (Pass I) [regular files] > > DUMP: mapping (Pass II) [directories] > > DUMP: estimated 61792 tape blocks on 1.59 tape(s). > > DUMP: Cannot open output "/dev/ad2s1e". > > DUMP: Do you want to retry the open?: ("yes" or "no") y > > DUMP: Cannot open output "/dev/ad2s1e". > > > > I get the same error if I try to dump into a folder: > > dump -0u -f /dev/ad2s1e/dump_of_root / > > > > Why can't dump write to the second drive? > > You seem to be getting the source and destination mixed up in > the dump command. The file you output the dump to is the > argument immediately following the '-f' flag: that should be > a standard system filename in your case. (Other entries you > may see commonly are '-' meaning write to the standard output > or '/dev/nrst0' or the like, meaning write to a tape device.) > The last entry on the dump command line is the filesystem to > dump. That can either be a directory from a mounted file > system, or the device file containing the filesystem you want to dump. > > In your case, you want to dump the root filesystem, which > seems to be living on /dev/ad0s1a, onto a partition on your > ad2 drive. Which means you need to create a filesystem on > /dev/ad2s1e and mount it: > > newfs /dev/ad2s1e > mount /mnt /dev/ad2s1e > mkdir /mnt/dump_of_root > dump -0u -f /mnt/dump_of_root/root.dump / > umount /mnt > > This creates a file 'root.dump' containing an image of your > root filesystem. Note that this sequence of commands will > destroy anything previously existing on the /dev/ad2s1e > partition. If you want to keep a regular series of backups > on your other drive, omit the 'newfs' step, and label your > output files by date: > > dump -0u -f /mnt/dump_of_root/root-`date +%Y%m%d`.dump / > > Cheers, > > Matthew > > -- > Dr Matthew J Seaman MA, D.Phil. 26 The Paddocks > Savill Way > Tel: +44 1628 476614 Marlow > Fax: +44 0870 0522645 Bucks., > SL7 1TH UK > > To Unsubscribe: send mail to majordomo@FreeBSD.org > with "unsubscribe freebsd-questions" in the body of the message > > To Unsubscribe: send mail to majordomo@FreeBSD.org with "unsubscribe freebsd-questions" in the body of the message
Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?028b01c24043$ab3fb220$0800a8c0>