zfs-backup/zb-snap

12 lines
220 B
Bash
Executable file

#!/bin/sh
source /etc/profile >/dev/null
[ -f "$HOME/.zb-rc" ] && source "$HOME/.zb-rc"
if [ -z "$1" ] ; then
echo "usage: $0 <zfs_object>" >&2
exit 1
fi
exec zfs snapshot "${1}@zb-`date '+%F %T %z' |tr '+ ' 'p_'`"