From owner-freebsd-questions Tue Feb 13 3:57:57 2001 Delivered-To: freebsd-questions@freebsd.org Received: from guru.mired.org (okc-65-26-235-186.mmcable.com [65.26.235.186]) by hub.freebsd.org (Postfix) with SMTP id 7178A37B491 for ; Tue, 13 Feb 2001 03:57:54 -0800 (PST) Received: (qmail 58002 invoked by uid 100); 13 Feb 2001 11:57:53 -0000 From: Mike Meyer MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Transfer-Encoding: 7bit Message-ID: <14985.8513.540288.954234@guru.mired.org> Date: Tue, 13 Feb 2001 05:57:53 -0600 To: David Kelly , mekanix@vip.cybercity.dk Cc: questions@freebsd.org Subject: Re: Moving setup from one HD to another. In-Reply-To: <977004@toto.iv> X-Mailer: VM 6.89 under 21.1 (patch 14) "Cuyahoga Valley" XEmacs Lucid X-face: "5Mnwy%?j>IIV\)A=):rjWL~NB2aH[}Yq8Z=u~vJ`"(,&SiLvbbz2W`;h9L,Yg`+vb1>RG% *h+%X^n0EZd>TM8_IB;a8F?(Fb"lw'IgCoyM.[Lg#r\ Sender: owner-freebsd-questions@FreeBSD.ORG Precedence: bulk X-Loop: FreeBSD.ORG Since no one mentioned it, the FAQ has an entry on this at David Kelly types: > Do it the first way. Write the new using the old rather than copy the > old on top of a temporary new. > > Off the top of my head I would type the command line: > > # dump 0af - / | ( cd /mnt ; restore -rf - ) > # dump 0af - /var | ( cd /mnt/var ; restore -rf - ) > # dump 0af - /usr | ( cd /mnt/usr ; restore -rf - ) > ... > > For quickie emergency backups all you really need are /etc, /var, and > /home. When I used to administer a bunch of machines I kept careful > records of which files got customized in /etc and elsewhere. The record > was in the form of a file list I used for tar to do backups. If you make sure that only ports goes into /usr, and application installations other than through the ports tree go into /home, that becomes even more true - the only thing on /usr that's changed is the configuration scripts. That /var is as critical as parts of / is a good reason to leave /var on /, unless you're going for a readonly root. As a final comment, there are tools to help keep track of customized files - they're called "source control systems" :-). I, personally, use Perforce. I've got a client that points at / used by root, so the process of restoring all those customized files is the command "p4 sync -f" as root. CVS is part of the core system; it should be able to do this, though someone with more experience than I should talk about setting it up. As a bonus, once you've done that, adding GENERIC & your kernel config files to it is easy, and you can then use the automated change integration tools to update your kernel config file. http://www.mired.org/home/mwm/ Independent WWW/Perforce/FreeBSD/Unix consultant, email for more information. To Unsubscribe: send mail to majordomo@FreeBSD.org with "unsubscribe freebsd-questions" in the body of the message