Date: Tue, 9 Dec 2003 18:06:47 -0500 From: lists@battleface.com To: Dan Nelson <dnelson@allantgroup.com> Cc: freebsd-questions@freebsd.org Subject: Re: archiving and restoring disk images... Message-ID: <5D80A07A-2A9C-11D8-9005-000A95775140@battleface.com> In-Reply-To: <20031209222630.GD2435@dan.emsphone.com>
next in thread | previous in thread | raw e-mail | index | archive | help
Thanks, Dan. I'm thinking this whole process over based on what you've said. I've never tried storing a disk as an archive, so I thought I'd try it on for size. Thanks for your point of view. Very helpful. Alex On Tuesday, December 9, 2003, at 05:26 PM, Dan Nelson wrote: > In the last episode (Dec 09), lists@battleface.com said: >> I dumped a disk image of my root partition like this: >> >> dd if=/dev/da0s1a | gzip -9 -c > where.ever.gz >> >> Does this include the boot sector? In other words, if I need to >> restore this disk image I can do the reverse and the boot sector and >> root partition will be back to that state. How should I go about >> this, if what I'm saying is valid? Can I do this in single user mode >> or should I boot from CD and go from there? I haven't needed to do >> this yet, but I want to know how. If dumping the root partition like >> this is not a good means of backing up, please say so. What would you >> recommend? I tar most everything else. > > The first BSD partition includes the disklabel partition and the boot > blocks for that slice, but will not contain the MBR or fdisk partition > table. Something like "dd if=/dev/da0 of=mbr count=1" would do that. > > To restore the disklabel partition you'll need to dd your where.ever > dump to /dev/da0s1, since on a new disk there won't be an 'a' partition > to write to. After the dd is done, the 'a' partition should appear. > > I usually either use dump or tar to back up my root partition, and use > sysinstall or a bootable CD image to fdisk and disklabel new media > before restoring. That way I can change the partition sizes if my new > disk is larger/smaller than the original. > > -- > Dan Nelson > dnelson@allantgroup.com > > - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - Alexander Sendzimir 802 863 5502 Mac Tutor of Vermont, LLC info @ mactutor . vt . us Colchester, VT 05446
Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?5D80A07A-2A9C-11D8-9005-000A95775140>