September 17-19, 2012

Westin Michigan Avenue Hotel, Chicago

Log in or Sign Up

PostgreSQL on ZFS: Replication, Backup, and Human Disaster Recovery

log in to bookmark this presentaton

Novice / Talk
September 17th 1:30 p.m. – 5 p.m.
The ZFS filesystem can be used simplify a number of replication, backup and recovery challenges. In this hands-on workshop, a quick introduction to the ZFS file system's features and capabilities will be presented, then a walk through of common scenarios where ZFS can save considerable hassle and countless hours when users and/or developers go astray.

Abstract

Attendees will receive an OpenIndiana VitualBox(R) image with PostgreSQL installed. The virtual machine will also have PostgreSQL instances configured for file-based log shipping, and streaming log replication. All of the commands needed to complete the following exercises will be supplied.

EXERCISES:

  • Replicate a PostgreSQL database to a slave server with zero down time on the master using zfs send. This can be safely performed in the middle of intensive write operations.
  • Update the slave server using an incremental ZFS send.
  • Set up timed snapshots of your production data.
  • Spin up a second PostgreSQL instance on a ZFS snapshot of your master or slave database. This lets you set up test or validation instances with virtually no additional disk space required. Perform tests on real data, and if things don't go so well, restore the database to its original state in seconds.
  • Turn the slave server into the master and send updates back to the old master.

We will also discuss file-based and streaming log replication, and how these can be used in conjunction with ZFS.

In order to perform the exercises in the workshop, you will need a laptop capable capable of running a VirtualBox VM.