From owner-freebsd-questions@freebsd.org Thu Sep 29 05:10:27 2016 Return-Path: Delivered-To: freebsd-questions@mailman.ysv.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:1900:2254:206a::19:1]) by mailman.ysv.freebsd.org (Postfix) with ESMTP id 66580C00FE0 for ; Thu, 29 Sep 2016 05:10:27 +0000 (UTC) (envelope-from wblock@wonkity.com) Received: from wonkity.com (wonkity.com [67.158.26.137]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client CN "wonkity.com", Issuer "wonkity.com" (not verified)) by mx1.freebsd.org (Postfix) with ESMTPS id 37665B89 for ; Thu, 29 Sep 2016 05:10:27 +0000 (UTC) (envelope-from wblock@wonkity.com) Received: from wonkity.com (localhost [127.0.0.1]) by wonkity.com (8.15.2/8.15.2) with ESMTPS id u8T5APvE011478 (version=TLSv1.2 cipher=DHE-RSA-AES256-GCM-SHA384 bits=256 verify=NO); Wed, 28 Sep 2016 23:10:25 -0600 (MDT) (envelope-from wblock@wonkity.com) Received: from localhost (wblock@localhost) by wonkity.com (8.15.2/8.15.2/Submit) with ESMTP id u8T5APeu011471; Wed, 28 Sep 2016 23:10:25 -0600 (MDT) (envelope-from wblock@wonkity.com) Date: Wed, 28 Sep 2016 23:10:25 -0600 (MDT) From: Warren Block To: Robert Huff cc: freebsd-questions@freebsd.org Subject: Re: Clone a FBSD system with something in the likes of ghost In-Reply-To: <57EC9527.7020202@rcn.com> Message-ID: References: <57EC9527.7020202@rcn.com> User-Agent: Alpine 2.20 (BSF 67 2015-01-07) MIME-Version: 1.0 Content-Type: text/plain; charset=US-ASCII; format=flowed X-Greylist: Sender IP whitelisted, not delayed by milter-greylist-4.4.3 (wonkity.com [127.0.0.1]); Wed, 28 Sep 2016 23:10:26 -0600 (MDT) X-BeenThere: freebsd-questions@freebsd.org X-Mailman-Version: 2.1.23 Precedence: list List-Id: User questions List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Thu, 29 Sep 2016 05:10:27 -0000 On Thu, 29 Sep 2016, Robert Huff wrote: > On 9/28/2016 10:43 PM, Alejandro Imass wrote: > >> I have a beautiful running server (dozens of jails and intricate >> configuration) on a single small and aging hard drive. I bought 2 new hard >> drives and want to migrate to a ZFS mirror. >> >> Pardon my ignorance but would there be a way to just copy my system from >> the old drive to the new ZFS array? >> >> I was thinking of something like this: 1) install the two new drives in the >> server and boot with old drive via an USB enclosure. 2) Create a booteable >> ZFS array and somehow copy an identical image of my current system onto the >> array. >> >> Am I dreaming or are there actual ways of doing this? I really don't want >> to re-install and configure everything. Just want to move an identical copy >> of my system to the new hard drives on a ZFS mirror. > > The canonical - and correct - method involves dump piped to restore; > there may be an example in the Handbook. I have not tried it, but I think restore(8) should work when writing to a ZFS system. So dump(8) on the original UFS piped to restore(8) on ZFS, presumably in a dataset or multiple datasets. http://www.wonkity.com/~wblock/docs/html/backup.html After it is on ZFS, dump(8) cannot be used, but zfs send and zfs recv are similar. Or rsync, or tar, or clonehd, or other things. The options with them are the trick. It takes a lot to get rsync to make a serious copy of a non-trivial filesystem with links and flags.