<s>
A	O
backup	B-Device
rotation	I-Device
scheme	I-Device
is	O
a	O
system	O
of	O
backing	B-Protocol
up	I-Protocol
data	O
to	O
computer	O
media	O
(	O
such	O
as	O
tapes	B-Architecture
)	O
that	O
minimizes	O
,	O
by	O
re-use	O
,	O
the	O
number	O
of	O
media	O
used	O
.	O
</s>
<s>
The	O
scheme	O
determines	O
how	O
and	O
when	O
each	O
piece	O
of	O
removable	O
storage	O
is	O
used	O
for	O
a	O
backup	B-Protocol
job	O
and	O
how	O
long	O
it	O
is	O
retained	O
once	O
it	O
has	O
backup	B-Protocol
data	O
stored	O
on	O
it	O
.	O
</s>
<s>
Such	O
a	O
scheme	O
can	O
be	O
quite	O
complicated	O
if	O
it	O
takes	O
incremental	O
backups	B-Protocol
,	O
multiple	O
retention	O
periods	O
,	O
and	O
off-site	O
storage	O
into	O
consideration	O
.	O
</s>
<s>
A	O
first	B-Operating_System
in	I-Operating_System
,	I-Operating_System
first	I-Operating_System
out	I-Operating_System
(	O
FIFO	B-Operating_System
)	O
backup	B-Protocol
scheme	O
saves	O
new	O
or	O
modified	O
files	O
onto	O
the	O
"	O
oldest	O
"	O
media	O
in	O
the	O
set	O
,	O
i.e.	O
</s>
<s>
Performing	O
a	O
daily	O
backup	B-Protocol
onto	O
a	O
set	O
of	O
14	O
media	O
,	O
the	O
backup	B-Protocol
depth	O
would	O
be	O
14	O
days	O
.	O
</s>
<s>
Each	O
day	O
,	O
the	O
oldest	O
media	O
would	O
be	O
inserted	O
when	O
performing	O
the	O
backup	B-Protocol
.	O
</s>
<s>
This	O
scheme	O
has	O
the	O
advantage	O
that	O
it	O
retains	O
the	O
longest	O
possible	O
tail	O
of	O
daily	O
backups	B-Protocol
.	O
</s>
<s>
It	O
can	O
be	O
used	O
when	O
archived	O
data	O
is	O
unimportant	O
(	O
or	O
is	O
retained	O
separately	O
from	O
the	O
short-term	O
backup	B-Protocol
data	O
)	O
and	O
data	O
before	O
the	O
rotation	O
period	O
is	O
irrelevant	O
.	O
</s>
<s>
However	O
,	O
this	O
scheme	O
suffers	O
from	O
the	O
possibility	O
of	O
data	O
loss	O
:	O
suppose	O
,	O
an	O
error	O
is	O
introduced	O
into	O
the	O
data	O
,	O
but	O
the	O
problem	O
is	O
not	O
identified	O
until	O
several	O
generations	O
of	O
backups	B-Protocol
and	O
revisions	O
have	O
taken	O
place	O
.	O
</s>
<s>
Thus	O
when	O
the	O
error	O
is	O
detected	O
,	O
all	O
the	O
backup	B-Protocol
files	O
contain	O
the	O
error	O
.	O
</s>
<s>
Grandfather-father-son	O
backup	B-Protocol
(	O
GFS	O
)	O
is	O
a	O
common	O
rotation	O
scheme	O
for	O
backup	B-Protocol
media	O
,	O
in	O
which	O
there	O
are	O
three	O
or	O
more	O
backup	B-Protocol
cycles	O
,	O
such	O
as	O
daily	O
,	O
weekly	O
and	O
monthly	O
.	O
</s>
<s>
The	O
daily	O
backups	B-Protocol
are	O
rotated	O
on	O
a	O
3-months	O
basis	O
using	O
a	O
FIFO	B-Operating_System
system	O
as	O
above	O
.	O
</s>
<s>
The	O
weekly	O
backups	B-Protocol
are	O
similarly	O
rotated	O
on	O
a	O
bi-yearly	O
basis	O
,	O
and	O
the	O
monthly	O
backup	B-Protocol
on	O
a	O
yearly	O
basis	O
.	O
</s>
<s>
In	O
addition	O
,	O
quarterly	O
,	O
half-yearly	O
,	O
and/or	O
annual	O
backups	B-Protocol
could	O
also	O
be	O
separately	O
retained	O
.	O
</s>
<s>
Often	O
some	O
of	O
these	O
backups	B-Protocol
are	O
removed	O
from	O
the	O
site	O
for	O
safekeeping	O
and	O
disaster	O
recovery	O
purposes	O
.	O
</s>
<s>
The	O
Tower	B-Language
of	I-Language
Hanoi	I-Language
rotation	O
method	O
is	O
more	O
complex	O
.	O
</s>
<s>
It	O
is	O
based	O
on	O
the	O
mathematics	O
of	O
the	O
Tower	B-Language
of	I-Language
Hanoi	I-Language
puzzle	I-Language
,	O
using	O
a	O
recursive	O
method	O
to	O
optimize	O
the	O
back-up	B-Protocol
cycle	O
.	O
</s>
<s>
Every	O
tape	O
corresponds	O
to	O
a	O
disk	O
in	O
the	O
puzzle	O
,	O
and	O
every	O
disk	O
movement	O
to	O
a	O
different	O
peg	O
corresponds	O
with	O
a	O
backup	B-Protocol
to	O
that	O
tape	O
.	O
</s>
<s>
A	O
set	O
of	O
n	O
tapes	B-Architecture
(	O
or	O
other	O
media	O
)	O
will	O
allow	O
backups	B-Protocol
for	O
2n−1	O
days	O
before	O
the	O
last	O
set	O
is	O
recycled	O
.	O
</s>
<s>
So	O
,	O
3	O
tapes	B-Architecture
will	O
give	O
4	O
days	O
 '	O
worth	O
of	O
backups	B-Protocol
,	O
and	O
on	O
the	O
4th	O
day	O
Set	O
C	O
will	O
be	O
overwritten	O
;	O
4	O
tapes	B-Architecture
will	O
give	O
8	O
days	O
,	O
and	O
Set	O
D	O
is	O
overwritten	O
on	O
the	O
9th	O
day	O
;	O
5	O
tapes	B-Architecture
will	O
give	O
16	O
days	O
,	O
etc	O
.	O
</s>
<s>
The	O
following	O
tables	O
show	O
which	O
tapes	B-Architecture
are	O
used	O
on	O
which	O
days	O
of	O
various	O
cycles	O
.	O
</s>
<s>
A	O
disadvantage	O
of	O
the	O
method	O
is	O
that	O
half	O
the	O
backups	B-Protocol
are	O
overwritten	O
after	O
only	O
two	O
days	O
.	O
</s>
<s>
Many	O
variations	O
are	O
possible	O
,	O
and	O
the	O
concepts	O
are	O
readily	O
extended	O
to	O
disc-based	O
directories	O
containing	O
backups	B-Protocol
.	O
</s>
<s>
Save	O
a	O
base	O
backup	B-Protocol
as	O
set	O
zero	O
.	O
</s>
<s>
Save	O
as	O
many	O
of	O
the	O
most	O
recent	O
backups	B-Protocol
as	O
desired	O
.	O
</s>
<s>
Coverage	O
automatically	O
gets	O
sparser	O
the	O
further	O
back	O
in	O
time	O
one	O
goes	O
,	O
which	O
approximates	O
the	O
likelihood	O
of	O
needing	O
to	O
do	O
restores	O
from	O
past	O
backups	B-Protocol
.	O
</s>
<s>
And	O
Tower	B-Language
of	I-Language
Hanoi	I-Language
has	O
the	O
huge	O
advantage	O
of	O
freeing	O
implementers	O
from	O
having	O
to	O
deal	O
with	O
managing	O
hourly	O
,	O
daily	O
,	O
weekly	O
,	O
monthly	O
,	O
quarterly	O
or	O
annual	O
management	O
strategies	O
.	O
</s>
<s>
In	O
general	O
,	O
backup	B-Protocol
set	O
number	O
set	O
is	O
used	O
at	O
seq	O
=	O
2set−1	O
+	O
j	O
×	O
2set	O
,	O
j	O
=	O
0	O
,	O
1	O
,	O
2	O
,	O
3	O
,	O
4	O
,	O
...	O
,	O
where	O
seq	O
is	O
the	O
sequence	O
or	O
serial	O
number	O
of	O
a	O
backup	B-Protocol
(	O
also	O
the	O
Tower	B-Language
of	I-Language
Hanoi	I-Language
move	O
number	O
)	O
.	O
</s>
<s>
An	O
alternative	O
arrangement	O
is	O
to	O
keep	O
generations	O
distributed	O
across	O
all	O
points	O
in	O
time	O
is	O
by	O
deleting	O
(	O
or	O
overwriting	O
)	O
past	O
generations	O
(	O
except	O
the	O
oldest	O
and	O
the	O
most-recent-n	O
generations	O
)	O
when	O
necessary	O
in	O
a	O
weighted-random	O
fashion	O
.	O
</s>
<s>
For	O
each	O
deletion	O
,	O
the	O
weight	B-Algorithm
assigned	O
to	O
each	O
deletable	O
generation	O
corresponds	O
to	O
the	O
probability	O
of	O
it	O
being	O
deleted	O
.	O
</s>
<s>
One	O
acceptable	O
weight	B-Algorithm
is	O
a	O
constant	O
exponent	O
(	O
possibly	O
the	O
square	O
)	O
of	O
the	O
multiplicative	O
inverse	O
of	O
the	O
duration	O
(	O
possibly	O
expressed	O
in	O
the	O
number	O
of	O
days	O
)	O
between	O
the	O
dates	O
of	O
the	O
generation	O
and	O
the	O
generation	O
preceding	O
it	O
.	O
</s>
<s>
The	O
weighted	B-Algorithm
random	O
method	O
only	O
has	O
an	O
advantage	O
over	O
a	O
more	O
systematic	O
approach	O
,	O
when	O
backups	B-Protocol
are	O
irregular	O
or	O
missed	O
.	O
</s>
<s>
Thus	O
one	O
has	O
access	O
to	O
every	O
backup	B-Protocol
for	O
one	O
cycle	O
and	O
to	O
one	O
backup	B-Protocol
per	O
cycle	O
before	O
that	O
.	O
</s>
