Tower of Hanoi puzzle, using a recursive method to optimize the back-up cycle. Every tape corresponds to a disk in the puzzle, and every disk movement to a different peg corresponds with a backup to that tape. So the first tape is used every other day (1, 3, 5, 7, 9, ...), the second tape is used every fourth day (2, 6, 10, ...), the third tape is used every eighth day (4, 12, 20, ...). A set of n tapes (or other media) will allow backups for 2n−1 days before the last set is recycled. So, 3 tapes will give 4 days' worth of backups, and on the 4th day Set C will be overwritten; 4 tapes will give 8 days, and Set D is overwritten on the 9th day; 5 tapes will give 16 days, etc. Files can be restored from 1, 2, 4, 8, 16, ..., 2n−1 days ago. The following tables show which tapes are used on which days of various cycles. A disadvantage of the method is that half the backups are overwritten after only two days. Three-tape Hanoi schedule Four-tape Hanoi schedule Five-tape Hanoi schedule Extensions and example Many variations are possible, and the concepts are readily extended to disc-based directories containing backups. Here are some options: Save a base backup as set zero. Save as many of the most recent backups as desired. Save more than one of each set number, for greater coverage. Coverage automatically gets sparser the further back in time one goes, which approximates the likelihood of needing to do restores from past backups. And Tower of Hanoi has the huge advantage of freeing implementers from having to deal with managing hourly, daily, weekly, monthly, quarterly or annual management strategies. In general, backup set number set is used at seq = 2set−1 + j × 2set, j = 0, 1, 2, 3, 4, ..., where seq is the sequence or serial number of a backup (also the Tower of Hanoi move number). Here is an example showing coverage, including set 0, keeping at least the last 4 days, and recycling: precious.20140515.seq.0 set 0 precious.20150205.seq.256 set 9 precious.20151026.seq.512 set 10 precious.20160311.seq.640 set 8 precious.20160516.seq.704 set 7 precious.20160601.seq.720 set 5 precious.20160609.seq.728 set 4 precious.20160617.seq.736 set 6 precious.20160618.seq.737.recycle set 1 precious.20160619.seq.738 set 2 precious.20160620.seq.739 set 1 precious.20160621.seq.740 set 3 precious.20160622.seq.741 set 1 Weighted random distribution An alternative arrangement is to keep generations distributed