From owner-freebsd-questions@FreeBSD.ORG Tue Jul 5 14:36:15 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 442EF16A41C for ; Tue, 5 Jul 2005 14:36:15 +0000 (GMT) (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 0A33543D46 for ; Tue, 5 Jul 2005 14:36:10 +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.12.10+Sun/8.12.2) with ESMTP id j65EaAJF021409; Tue, 5 Jul 2005 10:36:10 -0400 (EDT) Received: (from jerrymc@localhost) by clunix.cl.msu.edu (8.12.10+Sun/8.12.2/Submit) id j65EaAnM021408; Tue, 5 Jul 2005 10:36:10 -0400 (EDT) From: Jerry McAllister Message-Id: <200507051436.j65EaAnM021408@clunix.cl.msu.edu> To: gjbailey@gmail.com Date: Tue, 5 Jul 2005 10:36:10 -0400 (EDT) In-Reply-To: <48a5f32a050705071651b5ee5a@mail.gmail.com> 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: Dump & Restore to smaller partition 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, 05 Jul 2005 14:36:15 -0000 > > Hello, > > Does anyone know if the dump and restore method for > moving a partition to a new disk requires the destination > partition to be as big or bigger that the source? It will need to be big enough to contain all the data. It the old file system had a lot of empty (unused) space then the new one can be smaller by about the amount of space that was unused.. > >From my understanding, the whole partition, including > blank space will be dumped and restored. If this is the > case then the destination will need to be at least as big. Only the files (directories are also files) get dumped. It does not dump the filesystem as it was newfs-ed. Rather it makes a list of all the files & directories by inode number and then dumps each along with all ownership, permission, flag and link information. > My situation is as follows: > I have a 30GB usr partition with about 10GB of data in it. > I want to move this data (flags and all!) to a new 20GB > usr partition. > > Will dump/restore do this? .. or what should i use? No problem. After making the new partition with disklabel and making a filesystem out of it with newfs. Presuming your old 30 GB filesystem is mounted as /fsa and the new 20 GB filesystem is mounted as /fsb, dump 0af /fsa/fsa.dump /fsa cd /fsb restore rf /fsa/fsa.dump should work just fine - although it makes me nervous to put the dump file in the same filesystem you are dumping. Since it makes the inode list before it starts dumping and creating the dump file, it should work. It just feels weird. So, if you have some other place to put a 10 GB dump file, then go ahead and use it instead. ////jerry > > Thanks! > Gareth > _______________________________________________ > 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"