2020-10 upd: we reached the first fundraising goal and rented a server in Hetzner for development! Thank you for donating !
Attention! Current pages describe CBSD version 12.2.x. If you are using an older version, please update first.
Attention! I apologize for the automatic translation of this text. You can improve it by sending me a more correct version of the text or fix html pages via GITHUB repository.
Migration jails from ezjail
Author: Nikita Druba aka LordNicky
Original: via Issue#412
Notes: this is ZFS-only solution
Migration from ezjail with basejail to CBSD with basejail can be doing at least by this easy way:
- Install CBSD and do an initial setup, like in the manual
- Create an empty jail with any name, for example: "jail1", make sure, that you uncheck "astart" option.; (https://www.bsdstore.ru/en/12.0.x/wf_jcreate_ssi.html;
- Stop the jail from ezjail, that you want to migrate and do a snapshot of it filesystem:
ezjail stop MyJail
zfs snapshot mypool/path/to/ezjail/MyJail@migrating
- Create jail in CBSD by jconstruct-tui and put to "zfs_snapsrc" field path to snapshot of you jail:
- Check all other fields to set same ip, name and other settings. For network you can use syntax of ezjail, but instead "|" you need to use "#".
- Proceed you new jail. If creation of jail was successfully, then go to the next step
- Run migrating_ezjail_cbsd.sh script from ezjail2cbsd/. You can specify paths to directories of "migrating" and "example" jails in command:
migrating_ezjail_cbsd.sh path/to/cbsd/jail1 path/to/cbsd/MyJailor use dialog interface and enter paths there.
- Run you migrated jail by cbsd command and enjoy.
- Also you can be needed to destroy ezjail filesystems, but before destroying them you need to promote clones in CBSD directory:
zfs promote mypool/path/to/cbsd/MyJail
zfs destroy -r mypool/path/to/ezjail/MyJail(Be carefully with [-R] parameter, you need [-r].)