From owner-freebsd-questions@freebsd.org Sun Oct 2 18:13:13 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 0C1C9AEF6DA for ; Sun, 2 Oct 2016 18:13:13 +0000 (UTC) (envelope-from jd1008@gmail.com) Received: from mail-vk0-x22e.google.com (mail-vk0-x22e.google.com [IPv6:2607:f8b0:400c:c05::22e]) (using TLSv1.2 with cipher ECDHE-RSA-AES128-GCM-SHA256 (128/128 bits)) (Client CN "smtp.gmail.com", Issuer "Google Internet Authority G2" (verified OK)) by mx1.freebsd.org (Postfix) with ESMTPS id B8051874 for ; Sun, 2 Oct 2016 18:13:12 +0000 (UTC) (envelope-from jd1008@gmail.com) Received: by mail-vk0-x22e.google.com with SMTP id b186so7999869vkb.1 for ; Sun, 02 Oct 2016 11:13:12 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20120113; h=mime-version:in-reply-to:references:from:date:message-id:subject:cc; bh=Bsrz848gmJ9+5rq3l6v901ZC/yZ8rXZ12QbQnlmy/XU=; b=Gelq80HYW1ao70eTuURxSCpxLQxdm1/r4Y+HxPJ1+XNH+eV0OsupmLwOcPj2oAwQQh cBHxcgulNtrFUaX4TBPrcQROt86c7nRZOdPhLOvNu6Lhvk4s6YndygzZ/7hsizfEjEiC vw4N5gopkugZAiRWd41KbvVbbLW/+anHNn/itYadon9pVNE+E9ioIQAo/ywJPCb7OmQQ wIIwfAEGv2SoLMG0EINvdETS4lH7A12kky4Os1Arh226YyYssvsXdi2p8iOwS3uD4Q0c rZMQH7x054AReNoRlID5vVUIJ0KqxuLFaxmHMZ4F5HsWB6vEv+nmYzTSg57KMkhijTlH 9ZnQ== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20130820; h=x-gm-message-state:mime-version:in-reply-to:references:from:date :message-id:subject:cc; bh=Bsrz848gmJ9+5rq3l6v901ZC/yZ8rXZ12QbQnlmy/XU=; b=PDnTTAApM3uLdGAyIJTdFYM2wPhpIu4HLc5PeohjXh+ZsNgEQta3aEYe4KW9rtmSSd ogL1m62PpVOWqNIiWuAAZVftE8cujpcex7+o3btP3e/ObnuAw/mAEDtaEeZXpVgPYyLf S6JQXQdTMBFHjKHgQJkiXSy+iW/JqSPqxgTzPNtVo6YVXOvwqliXsT7BR3LnpuR5Z6Eg jYLnoqb0nfDeO1Q5/J6FSOwPSklb4QcnEhRf43wUuU6MtlOgmMf8R0kirjWp135/cf33 nS7kX42bNfJ5UbrkKgBt+v9LRryhIb3IDguFMAcKjssokmA0IKyJkFGBWtHSiRsdDCbP 6BeA== X-Gm-Message-State: AA6/9Rnvjp5V+f7gZ6YGNz0ISACDSfXzVO9ca6VEO3M2kzYl2jG3PcD0CCZSBrj5cB6O7oh7zhdO44ZW952JCQ== X-Received: by 10.31.41.134 with SMTP id p128mt2019931vkp.68.1475431991898; Sun, 02 Oct 2016 11:13:11 -0700 (PDT) MIME-Version: 1.0 Received: by 10.176.2.234 with HTTP; Sun, 2 Oct 2016 11:12:31 -0700 (PDT) In-Reply-To: References: <57EC9527.7020202@rcn.com> From: JD Date: Sun, 2 Oct 2016 12:12:31 -0600 Message-ID: Subject: Re: Clone a FBSD system with something in the likes of ghost Cc: Warren Block , FreeBSD Questions Content-Type: text/plain; charset=UTF-8 X-Content-Filtered-By: Mailman/MimeDel 2.1.23 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: Sun, 02 Oct 2016 18:13:13 -0000 By clone, you mean create a new disk with identical content to the cloned disk? Including the boot blocks of the cloned disk? If so, dump and restore will only perform like a full backup. The target (copy-to) disk will not be bootable. If you want it bootable, then there is a simlpe procedure 1. Obtain a new disk with sufficient capacity as close as possible to size of the source disk. Not less than, though!! 2. dd if= of=/dev/..... i.e. the new disk> bs=128M conv=notrunc conv=fdatasync When finished, without error, the new disk will be a bootable mirror of the original. HTH On Thu, Sep 29, 2016 at 6:37 PM, Alejandro Imass wrote: > On Thu, Sep 29, 2016 at 1:10 AM, Warren Block wrote: > > > > 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. > > Thanks for your suggestions! > I will look into dump and restore. > > Thanks again! > > Alejandro Imass > _______________________________________________ > freebsd-questions@freebsd.org mailing list > https://lists.freebsd.org/mailman/listinfo/freebsd-questions > To unsubscribe, send any mail to "freebsd-questions- > unsubscribe@freebsd.org" >