From owner-freebsd-questions@FreeBSD.ORG Thu Dec 6 15:26:28 2007 Return-Path: Delivered-To: freebsd-questions@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34]) by hub.freebsd.org (Postfix) with ESMTP id 4DB4016A420 for ; Thu, 6 Dec 2007 15:26:28 +0000 (UTC) (envelope-from jhary@unsane.co.uk) Received: from unsane.co.uk (unsane-pt.tunnel.tserv2.fmt.ipv6.he.net [IPv6:2001:470:1f03:1f1::2]) by mx1.freebsd.org (Postfix) with ESMTP id 5AB1313C4D3 for ; Thu, 6 Dec 2007 15:26:27 +0000 (UTC) (envelope-from jhary@unsane.co.uk) Received: from prawn.unsane.co.uk (150.117-84-212.staticip.namesco.net [212.84.117.150]) (authenticated bits=0) by unsane.co.uk (8.14.0/8.14.0) with ESMTP id lB6FQF76075638 (version=TLSv1/SSLv3 cipher=DHE-RSA-AES256-SHA bits=256 verify=NO); Thu, 6 Dec 2007 15:26:24 GMT (envelope-from jhary@unsane.co.uk) Message-ID: <47581490.6020200@unsane.co.uk> Date: Thu, 06 Dec 2007 15:26:08 +0000 From: Vince User-Agent: Thunderbird 2.0.0.9 (X11/20071116) MIME-Version: 1.0 To: Konstantinos Pachnis References: <539c60b90712041638s78b4e40fn67434f2dce5e27e7@mail.gmail.com> <20071205154148.GB21074@gizmo.acns.msu.edu> <1196874620.32615.15.camel@p25dual1.lanl.gov> <47580BC8.6050205@freemail.gr> In-Reply-To: <47580BC8.6050205@freemail.gr> X-Enigmail-Version: 0.95.2 Content-Type: text/plain; charset=ISO-8859-1 Content-Transfer-Encoding: 7bit Cc: Jerry McAllister , jamesh@lanl.gov, Steve Franks , User Questions Subject: Re: copying just / (not /tmp, /usr, etc) (rsync -x failed) 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: Thu, 06 Dec 2007 15:26:28 -0000 Konstantinos Pachnis wrote: > James Harrison wrote: >> On Wed, 2007-12-05 at 10:41 -0500, Jerry McAllister wrote: >> >>> On Tue, Dec 04, 2007 at 05:38:20PM -0700, Steve Franks wrote: >>> >>> >>>> I have / on one slice, and [usr,tmp,var] on others. I want to move >>>> just / to a new disk, which seemed to be what rsync -x ("do not cross >>>> filesystems") was intended for. It failed, however, as df shows 20k >>>> blocks in /, and rsync filled up the target slice with 50k blocks, so >>>> obviously it blew right past the 'end' of / - did I miss something? Is >>>> there no other way except to umount [tmp,usr,var]? >>>> >>> I would use dump/restore. >>> >>> Build the filesystem in the new disk partition with fdisk, bsdlabel >>> and newfs as needed. Then mount the new partition somewhere - >>> example: >>> mkdir /newpart >>> mount /dev/ad1s1a /newpart >>> (presuming new disk is ad1, slice is 1, partition is a) >>> Doesn't hurt to do an fsck on it here before writing to it, but it >>> probably isn't really needed. >>> >>> Then, run the dump/restore >>> >>> cd /newpart >>> dump 0af - / | restore -rf - >>> >>> This will get all of / as you want. The other mountpoints for /tmp, /usr >>> and /var will be copied, but not the contents of those filesystems. You >>> probably want that. >>> >>> ////jerry >>> >>> >>>> Thanks, >>>> Steve >>>> >> Everyone's recommending dump/restore for copying file systems, and >> there's something that I've never really been clear on. >> >> The nice thing about rsync is that it's network aware. Can dump dump a >> file system across a network? >> Not following the rest of the thread so sorry if a duplicate answer. you can easily dump to a file across a network if you have ssh configured. something like dump -f - /dev/ad1s1 | ssh user@remotehost "cat > /path/to/dumpfile.ad1s1.oldhost" Dump can also talk to remote tape devices using rmt apparently but I've never tried this. Vince >> James >> >> _______________________________________________ >> 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" >> >> > Hi, > If you want to perform network backups, you should consider using a > network aware backup solution such as Bacula or Amanda. > > Konstantinos > > _______________________________________________ > 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"