Thursday, August 31, 2006

ZFS - Another way to recover from a screw up... :)

Doug Burns wrote in his blog how he accidentally messed up some of his Oracle database development environments. Doug, I remember that a little while back, we had a short chat over at Christo Kutrovsky's follow-up blog entry to my ZFS post.

If you've had the chance to install Solaris 10 update 2 (6/06 release), it would be a good time to try ZFS, specially on development environments. ZFS has a snapshot feature and this is one of the ZFS features that I really love.

For example, I use this to create snapshots of entire filesystems. In your case, if there was a snapshot of /ora/data2, recovering the data from the snapshot would have been very f-a-s-t (most likely seconds). I routinely do this with my development environments.

I also use ZFS snapshots in place of the OS-level copy command when doing Oracle hot backups. When done this way, hot backups can be completed in seconds no matter how big the datafiles are.

Another place where I use ZFS snapshots is when I upgrade Oracle or any other software that is mounted under ZFS. If something does not work as I expect, a zfs rollback will quickly (again, seconds) bring order to a messy situation. :)

But my favorite use of ZFS snapshots is to snapshot entire Solaris 10 zones. Sometimes, these zones host Oracle databases. If something gets messed up, I simply issue a zfs rollback command and the entire zone goes back to its state when the snapshot was taken. Very fast and very neat. :)

I've been meaning to make a more detailed post about this for a while now, complete with examples for Oracle. Maybe now is a good time for me to do that. I hope I can make time to write something soon.

No comments: