Skip to content

Instantly share code, notes, and snippets.

@typomedia
Last active August 29, 2015 14:00
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save typomedia/11378959 to your computer and use it in GitHub Desktop.
Save typomedia/11378959 to your computer and use it in GitHub Desktop.
ZFS Dump Script
#!/bin/sh
# Copyright 2014 Typomedia Foundation. All rights reserved.
# Released under GPL version 3.
#
# ZFS Root Dump Script v1.0
HOST=`hostname`
DEST=/dpool/backup/OpenIndiana
DATE=`date '+%Y%m%d'`
# get last snapshot
SNAP=`zfs list -t snapshot -o name -S creation | grep rpool | head -1`
zfs send $SNAP > $DEST/$HOST.openindiana-$DATE.zfsdump
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment