HowTo: Notes on ZFS configuration backup

Step-by-Step descriptions of how to do things.
Post Reply
User avatar
Site Admin
Posts: 1481
Joined: Fri Aug 29, 2003 8:39 pm

HowTo: Notes on ZFS configuration backup

Post by ^rooker »

Shellscript sketchpad for documenting the configuration of a ZFS storage constellation:

Code: Select all


TIMESTAMP="$(date +%Y%m%d-%H%M )"

function run_cmd

    echo "$CMD"
    eval "$CMD" | tee -a $INFOFILE

function log_line
    echo ""
    echo ""
    echo "==========================================="
    echo "$MSG"
    echo ""

log_line "ZFS Configuration - [$TIMESTAMP]"

run_cmd 'zpool list'
run_cmd 'zpool status tank4'
run_cmd 'zfs list tank4'
run_cmd 'zfs get all tank4'
Creates a textfile with all information considered relevant, or at least easily gatherable running ZFS on GNU/Linux.
Jumping out of an airplane is not a basic instinct. Neither is breathing underwater. But put the two together and you're traveling through space!
Post Reply