piątek, 9 maja 2008

ZFS snapshots

I started to like them. I became accustomed to create a snapshot of my filesystems periodically, just as I click Save button in Editors. Really nice feature, which makes my life easier. Undelete is almost obsolete. :)
For interested:


-bash-3.2# cat /usr/bin/zfs_snapshot.sh
#!/bin/sh

zfs snapshot -r rpool@`date +%Y-%m-%d:-:%H:%M`



-bash-3.2# time zfs_snapshot.sh

real 0m1.257s
user 0m0.014s
sys 0m0.023s

-bash-3.2# zfs list
NAME USED AVAIL REFER MOUNTPOINT
rpool 21,2G 67,9G 56,5K /rpool
rpool/ROOT 5,94G 67,9G 18K /rpool/ROOT
rpool/ROOT/opensolaris-1 5,94G 67,9G 5,28G legacy
rpool/ROOT/opensolaris-1@2008-05-09:-:22:59 0 - 5,28G -
rpool/ROOT/opensolaris-1/opt 673M 67,9G 673M /opt
rpool/ROOT/opensolaris-1/opt@2008-05-09:-:22:59 0 - 673M -
rpool/export 15,2G 67,9G 19K /export
rpool/export/home 15,2G 67,9G 15,2G /export/home
rpool/export/home@2008-05-09:-:22:59 70,5K - 15,2G -

Brak komentarzy: