ZFS Managing iocage snapshots

I really dig sysutils/iocage. One of the coolest features is being able to take a jail snapshot.

iocage snapshot lweb.autonlab.org

which gives

Code:
# iocage snaplist lweb.autonlab.org
NAME  CREATED  RSIZE  USED
ioc-2015-08-30_23:17:03  Sun Aug 30 23:17 2015  152K  0

Removing snapshots is also easy. For example

Code:
# iocage snapremove lweb.autonlab.org@ioc-2015-08-30_23:13:25
* removing snapshot: ioc-2015-08-30_23:13:25

Does anyone has a script which could be run from a cron and remove snapshots older than
certain time?
 
Hi Oko ,
To restore the full jail, I understand that you run iocage rollback UUID|TAG@snapshotname but could you tell me how you'll restore a specific directory from the snapshot?
 
Hi Oko ,
To restore the full jail, I understand that you run iocage rollback UUID|TAG@snapshotname but could you tell me how you'll restore a specific directory from the snapshot?
By hand. Iocage simply uses the standard ZFS snapshot capabilities and what you want to do isn't possible with ZFS snapshot/rollback commands.
 
Do you mean something like this?
cp /iocage/UUID/.zfs/snapshot/usr/local/mydir /iocage/UUID/root/usr/local/mydir
 
Back
Top