So no way to clone a jail, huh?

Status
Not open for further replies.

ksignorini

Cadet
Joined
Jan 15, 2017
Messages
9
After reading many (MANY) threads here, most of which are very old, I've come to the conclusion that there is no way in FreeNAS 9.10.2 (9.10.2-U1 to be exact) to make a copy of a jail and use it as a template for other copies of the same jail.

Am I correct?

(I really hope I'm wrong as I have a nice FAMP setup in a jail and I would like to create some copies of it to run separate web servers.)

Thanks.
 

SweetAndLow

Sweet'NASty
Joined
Nov 6, 2013
Messages
6,421
Does warden have commands to do what you want?

Sent from my Nexus 5X using Tapatalk
 

Allan Wilmath

Explorer
Joined
Nov 26, 2015
Messages
99
Unix/Linux is largely just a bunch of files. So if you create a new jail with the network settings you want, then use a copy command to move a copy over. I would try cp -Ra <source jail> <target jail>. This will have to be done from the FreeNAS command line using the paths for the jails as they are on the FreeNAS file system.

The R is for recursive, and the a is for archive. The trick will be to move the files while retaining permissions. as long as you get the from path correct, you should not damage the source jail and can experiment some. You can also snapshot the working jail before doing anything.

If that doesn't work, I'd google rsync and give that a try. Since you are not booting, it really should be pretty easy.
 

ksignorini

Cadet
Joined
Jan 15, 2017
Messages
9
Unix/Linux is largely just a bunch of files. So if you create a new jail with the network settings you want, then use a copy command to move a copy over. I would try cp -Ra <source jail> <target jail>. This will have to be done from the FreeNAS command line using the paths for the jails as they are on the FreeNAS file system.

The R is for recursive, and the a is for archive. The trick will be to move the files while retaining permissions. as long as you get the from path correct, you should not damage the source jail and can experiment some. You can also snapshot the working jail before doing anything.

If that doesn't work, I'd google rsync and give that a try. Since you are not booting, it really should be pretty easy.

I'll have to do some experimenting myself (maybe in a VM copy of FreeNAS 9.10.x) but I've read plenty of posts stating that flat out copies don't work--that the GUI driven parts of FreeNAS have trouble reconnecting to the copy of the jail. We'll see, I guess.
 

ksignorini

Cadet
Joined
Jan 15, 2017
Messages
9
Does warden have commands to do what you want?

Sent from my Nexus 5X using Tapatalk

Apparently the version of warden included in FreeNAS 9.3 and up is some modified version with either messed up scripts, or that messes up scripts that it generates when you export/import. Either way, apparently it doesn't work and there are warnings to avoid doing anything with jails that doesn't involve the GUI. ...and yet, no button to simply duplicate a jail. I would have thought that if it was as easy as export/import, there would be a button automating it in the GUI.
 
Status
Not open for further replies.
Top