hot to print active pool

7 views
Skip to first unread message

bal...@gmail.com

unread,
Aug 13, 2020, 4:38:07 PM8/13/20
to iocage
Using iocage activate there is a way to set a pool for iocage use. Is there a way to print the currently active pool?
I'd like to automatically take a cold snapshot of <zpool>/iocage which requires knowledge about the currently active pool.

#!/bin/bash
echo $(date '+%Y-%m-%d %H:%M:%S') "Stopping all jails..."
iocage stop --rc
SNAPSHOT_NAME=$(date "+auto-%Y%m%d-%H%M")
echo $(date '+%Y-%m-%d %H:%M:%S') "Taking snapshot $SNAPSHOT_NAME"
zfs snapshot -r <zpool>/iocage@$SNAPSHOT_NAME
echo $(date '+%Y-%m-%d %H:%M:%S') "Starting all jails..."
iocage start --rc
echo $(date '+%Y-%m-%d %H:%M:%S') "Done."

Reply all
Reply to author
Forward
0 new messages