Skip site navigation (1)Skip section navigation (2)
Date:      Wed, 12 Jul 2017 18:03:30 +0100
From:      Kaya Saman <kayasaman@gmail.com>
To:        freebsd-questions@freebsd.org
Subject:   Re: A readers digest version of transferring a jail from one host to another.
Message-ID:  <74268400-5a27-805f-5c46-dbe36cfffe72@gmail.com>
In-Reply-To: <fbf23c482da0772e7b714a19501bfc1f.squirrel@webmail.harte-lyne.ca>
References:  <772bdab1906a8a3deea24fb6b246e40e.squirrel@webmail.harte-lyne.ca> <CAOc73CAuiAdDmgbi3tgzd2o0WZHpPE4sF2sMi3%2BQC=Xpa8c4mA@mail.gmail.com> <fbf23c482da0772e7b714a19501bfc1f.squirrel@webmail.harte-lyne.ca>

next in thread | previous in thread | raw e-mail | index | archive | help
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 <jail_name>

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
>>
>> <Then copy the  archive file to new server (same directory). By
>> 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.
>




Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?74268400-5a27-805f-5c46-dbe36cfffe72>