BSDStore
management and repository for FreeBSD jails

jail snapshot (zfs-only)


Attention! I apologize, but it is automatic machine translation of the text. You can improve it if will send to me more correct version of the text or fix html pages via GITHUB repository.

Commands:

% cbsd jsnapshot
Description:

Show the list, create, delete and rollback snapshots for a jail when node startend on ZFS filesystem and zfsfeat in file $workdir/nc.inventory set to 1. through mode parameter you can you specify that it is necessary to make. Possible options:

list - show snapshot liss for current jail
create - create snapshot for jail
destroy - delete snapshot for jail
destroyall - remove all snapshots for jail
clone - clone snapshot into new jail
rollback - rollback jail to current snapshot state

Additional arguments:

jname - for what jail action is made
snapname - snapshot name
snapfs -

Example:

create snapshot named gromozeka for jail1 jail:

% cbsd jsnapshot mode=create jname=jail1 snapname=gromozeka
create snapshot named zelepuka for jail1 jail:

% cbsd jsnapshot mode=create jname=jail1 snapname=zelepuka

Run jail1 and stop after some modification:

% cbsd jstart jail1
..
% cbsd jexec jname=jail1 cp /bin/date /root
% cbsd jexec jname=jail1 file -s /root/date
/root/date: ELF 64-bit LSB executable, x86-64, version 1 (FreeBSD), dynamically linked (uses shared libs), for FreeBSD 9.0 (900506), stripped
% cbsd jstop jail1
..
Rollback jail1 to snapshot zelepuka state:

% cbsd jsnapshot mode=rollback snapname=zelepuka jname=jail1
% cbsd jstart jail1
...
% cbsd jexec jname=jail1 file -s /root/date
/root/date: ERROR: cannot open `/root/date' (No such file or directory)