dajhorn/zfs-auto-snapshot — Issue #3: Implement the Hanoi algorithm for automated ZFS snapshots
Author: dajhorn
Created: 2011-12-31 16:49:53+00:00
State: open

From http://lists.debian.org/debian-bsd/2011/12/msg00045.html

```
# This algorithm implements a variation of the Towers of Hanoi rotation method
# (see http://en.wikipedia.org/wiki/Backup_rotation_scheme#Towers_of_Hanoi).
#
# Unlike traditional ToH rotation, which uses a finite set of physical tapes,
# we operate on a set of snapshots whose size doesn't necessarily have to be
# bounded. Note that the number of snapshots only grows logarithmically with
# time, which makes it very hard to fill your hard disk (even when running
# unbounded).
#
# The result is that once we've run this for long enough, we'll find that for
# recent dates (e.g. last few days) almost all snapshots are available, and the
# older the date we're searching the more spread available snapshots will be.
```