A readers digest version of transferring a jail from one host to another.

Kaya Saman kayasaman at gmail.com
Wed Jul 12 17:03:34 UTC 2017

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 

then start the new jail on host /etc/rc.d/jail start myjail

this is an alternate as an FYI :-)



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|,lo1|::150:1,re0|'
> Which produced exactly the result I sought.
> Thanks again.

More information about the freebsd-questions mailing list