From owner-freebsd-questions@freebsd.org Wed Jul 12 17:03:34 2017 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 11F45D9DD7E for ; Wed, 12 Jul 2017 17:03:34 +0000 (UTC) (envelope-from kayasaman@gmail.com) Received: from mail-wm0-x229.google.com (mail-wm0-x229.google.com [IPv6:2a00:1450:400c:c09::229]) (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 9613F6ED80 for ; Wed, 12 Jul 2017 17:03:33 +0000 (UTC) (envelope-from kayasaman@gmail.com) Received: by mail-wm0-x229.google.com with SMTP id w126so444415wme.0 for ; Wed, 12 Jul 2017 10:03:33 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20161025; h=subject:to:references:from:message-id:date:user-agent:mime-version :in-reply-to:content-transfer-encoding:content-language; bh=UL1Uu3jUJydZ407T21PyDCuul2T6uVqlXoFEYIEs7GE=; b=GPBn0hji3dT5bhFOsHFHqLV28xcdrQYdaNucq0oioZGl/K1OaUsyPyqpSkozjZlRXQ VbdOZ3nCYxXIrVoPjZCdR47noMM6eOK2wxZHO64E343q++0bSHmYb00XtV4zdYV/lqEg K6mGtQ3nhMuydarsiqNocbOicgF0z4SFD5rrNwz4xAdW2hUpqbBQNHTpuKrIqopDbxZV gDDvjjHbRGnolEpBADYzNf/aOi65dD9PJj38n85JyKu5CUg+Nta8IgqUqWkNcVQ5Q2yb Ypc8EDqxXrRDcgw0hD1vCinGeeoC6K+2ARWU6suSFOCBCPt6HbRr8568//inONAH4qP8 Jomw== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20161025; h=x-gm-message-state:subject:to:references:from:message-id:date :user-agent:mime-version:in-reply-to:content-transfer-encoding :content-language; bh=UL1Uu3jUJydZ407T21PyDCuul2T6uVqlXoFEYIEs7GE=; b=rZWnZFHTxVkSU496bFVKeBdn0+jaSXYbDCtgZD+Q3ybASjLDwRqxvACnLqIfacH1K8 wx08WTTIDQSOyK1iP6x3ccfak1OuYuB1aeFKQVSwgW+aEvaJ/r+ZubKOyRLS2HfGieSK vpCD5M6KKjyPLyC+43tg4LYZzM/Z7e/z83rG25JCNQ2liXoq2TbAtcEWxiod/n1yMQeX 3xGlDfrFg47Vcrb2OQtLkHP0ScURSK7qi8HspRWMewywMjrJ3+sZGh7rWtGZR3lBWANI ttTGPoh3Oxp7fUilQuL3jE5S9bfhnxuJFxveBs+jIPlyhGs/m6jLdnTax38SBFKdgY3d dznQ== X-Gm-Message-State: AIVw111f/ewzrnNMhwTtE9EI3d+0E2cHgRY/gyDuyL1/7Nj7Y9+Kb1iG kDr1jrPczvjNNGsI2aw= X-Received: by 10.28.49.7 with SMTP id x7mr3470108wmx.57.1499879011278; Wed, 12 Jul 2017 10:03:31 -0700 (PDT) Received: from x220.optiplex-networks.com (optiplexnetworks.plus.com. [212.159.80.17]) by smtp.gmail.com with ESMTPSA id 79sm1786682wrc.34.2017.07.12.10.03.30 for (version=TLS1_2 cipher=ECDHE-RSA-AES128-GCM-SHA256 bits=128/128); Wed, 12 Jul 2017 10:03:30 -0700 (PDT) Subject: Re: A readers digest version of transferring a jail from one host to another. To: freebsd-questions@freebsd.org References: <772bdab1906a8a3deea24fb6b246e40e.squirrel@webmail.harte-lyne.ca> From: Kaya Saman Message-ID: <74268400-5a27-805f-5c46-dbe36cfffe72@gmail.com> Date: Wed, 12 Jul 2017 18:03:30 +0100 User-Agent: Mozilla/5.0 (X11; Linux x86_64; rv:52.0) Gecko/20100101 Thunderbird/52.2.1 MIME-Version: 1.0 In-Reply-To: Content-Type: text/plain; charset=utf-8; format=flowed Content-Transfer-Encoding: 7bit Content-Language: en-US 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: Wed, 12 Jul 2017 17:03:34 -0000 Just to chime in here quickly as I have had to do this too, however, not using ezjail - forgive me if this has already been mentioned as I've just caught the tail of the thread and of course don't want to hijack anyone elses input... For me I usually stop jail: /etc/rc.d/jail stop rsync -"flags" path/to/jail "rsync:"/new/path/to/jail eg. rsync -avvc --progress --remove-source-files /jl/myjail rsync://10.0.0.1:/jl/myjail then start the new jail on host 10.0.0.1: /etc/rc.d/jail start myjail this is an alternate as an FYI :-) Regards, Kaya On 07/12/2017 05:44 PM, James B. Byrne via freebsd-questions wrote: > On Fri, June 30, 2017 19:37, Ben Woods wrote: >> Hi James, >> >> With ezjail the easiest way to take a copy of a jail and move it to >> another host is with the build in archive/restore process. >> >> Old server: >> # ezjail-admin stop jailname >> # ezjail-admin archive jailname >> >> > default it will be in /usr/jails/ezjail_archives.> >> >> New server: >> # ezjail-admin restore archivefilename >> # ezjail-admin start jailname >> >> For more details and optional arguements to these commands you can >> refer to the manpage: >> http://man.freebsd.org/ezjail-admin >> >> Regards, >> Ben > Thank you for the advice. It was most useful now that I have finally > gotten to use it. I did mention that I was pressed for time. I > simply did not realize just how pressed I would be. > > After creating and transferring the archives to the target host what I > ended up doing was a variant of this command: > > ezjail-admin create \ > -a /usr/jails/ezjail_archives/hllmx18-201707041251.23.tar.gz \ > hllmx150 'lo1|127.0.150.1,lo1|::150:1,re0|192.168.209.150' > > Which produced exactly the result I sought. > > Thanks again. >