From owner-freebsd-questions@FreeBSD.ORG Tue May 2 13:02:26 2006 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 EB94E16A406 for ; Tue, 2 May 2006 13:02:26 +0000 (UTC) (envelope-from jerrymc@clunix.cl.msu.edu) Received: from clunix.cl.msu.edu (clunix.cl.msu.edu [35.9.2.10]) by mx1.FreeBSD.org (Postfix) with ESMTP id 96B8243D45 for ; Tue, 2 May 2006 13:02:26 +0000 (GMT) (envelope-from jerrymc@clunix.cl.msu.edu) Received: from clunix.cl.msu.edu (localhost [127.0.0.1]) by clunix.cl.msu.edu (8.13.6+Sun/8.12.2) with ESMTP id k42D2Pfw013159; Tue, 2 May 2006 09:02:25 -0400 (EDT) Received: (from jerrymc@localhost) by clunix.cl.msu.edu (8.13.6+Sun/8.12.2/Submit) id k42D2Pgi013158; Tue, 2 May 2006 09:02:25 -0400 (EDT) From: Jerry McAllister Message-Id: <200605021302.k42D2Pgi013158@clunix.cl.msu.edu> To: dick@nagual.st (dick hoogendijk) Date: Tue, 2 May 2006 09:02:25 -0400 (EDT) In-Reply-To: <20060502111316.GA1267@arwen.nagual.st> X-Mailer: ELM [version 2.5 PL7] MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Transfer-Encoding: 7bit Cc: freebsd-questions Subject: Re: backup system rsync <-> 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: Tue, 02 May 2006 13:02:27 -0000 > > I have two disks; one is the fbsd system drive, the other is for backup > purposes. > > I'm in doubt about what to use: dump or rsync I use dump/restore, but do the command slightly differently. Since dump works on a file system I cd to the destination mount point and work from there and I don't have to put the cd in the middle. cd /backup/root dump -0aLf - / | restore -rf - works fine. You don't have to newfs each time, but you do need to do something to clean out the destination file system so I guess newfs works as well as rm -rf. ////jerry > > I guess I can do something like: > mount /dev/ad1s3a /backup/root > mount /dev/ad1s3d /backup/var > mount /dev/ad1s3f /backup/usr > /usr/local/bin/rsync -avHxS --delete /usr /backup/usr > for /usr / and var > > OR > > #!/bin/sh > newfs /dev/ad0s3a > newfs /dev/ad0s3d > newfs /dev/ad0s3f > mount /dev/ad0s3a /backup/root > mount /dev/ad0s3d /backup/var > mount /dev/ad0s3f /backup/usr > (/sbin/dump -L -0f - /)|(cd /backup/root ; /sbin/restore -rf -) > (/sbin/dump -L -0f - /var)|(cd /backup/var ; /sbin/restore -rf -) > (/sbin/dump -L -0f - /usr)|(cd /backup/usr ; /sbin/restore -rf -) > umount /backup/root > umount /backup/var > umount /backup/usr > tunefs -n enable /dev/ad0s3d > tunefs -n enable /dev/ad0s3f > > This gives me a perfect copy, BUT there is a risk if something goes > wrong when I have newfs'd the backup drive. > > Any advice? > > -- > dick -- http://nagual.st/ -- PGP/GnuPG key: F86289CE > ++ Running FreeBSD 6.1 ++ The Power to Serve > _______________________________________________ > 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" >