1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
|
<!DOCTYPE HTML PUBLIC "-//IETF//DTD HTML 2.0//EN">
<!--Converted with LaTeX2HTML 96.1-h (September 30, 1996) by Nikos Drakos (nikos@cbl.leeds.ac.uk), CBLU, University of Leeds -->
<HTML>
<HEAD>
<TITLE>Multilevel backups</TITLE>
<META NAME="description" CONTENT="Multilevel backups">
<META NAME="keywords" CONTENT="sag">
<META NAME="resource-type" CONTENT="document">
<META NAME="distribution" CONTENT="global">
<LINK REL=STYLESHEET HREF="sag.css">
</HEAD>
<BODY LANG="EN" >
<A NAME="tex2html1613" HREF="node104.html"><IMG WIDTH=37 HEIGHT=24 ALIGN=BOTTOM ALT="next" SRC="./next_motif.gif"></A> <A NAME="tex2html1611" HREF="node96.html"><IMG WIDTH=26 HEIGHT=24 ALIGN=BOTTOM ALT="up" SRC="./up_motif.gif"></A> <A NAME="tex2html1605" HREF="node102.html"><IMG WIDTH=63 HEIGHT=24 ALIGN=BOTTOM ALT="previous" SRC="./previous_motif.gif"></A> <A NAME="tex2html1615" HREF="node1.html"><IMG WIDTH=65 HEIGHT=24 ALIGN=BOTTOM ALT="contents" SRC="./contents_motif.gif"></A> <A NAME="tex2html1616" HREF="node114.html"><IMG WIDTH=43 HEIGHT=24 ALIGN=BOTTOM ALT="index" SRC="./index_motif.gif"></A> <BR>
<B> Next:</B> <A NAME="tex2html1614" HREF="node104.html">What to back up</A>
<B>Up:</B> <A NAME="tex2html1612" HREF="node96.html">Backups</A>
<B> Previous:</B> <A NAME="tex2html1606" HREF="node102.html">Restoring files with tar</A>
<BR> <P>
<H1><A NAME="SECTION001150000000000000000">Multilevel backups</A></H1>
<P>
The simple backup method outlined in the previous section
is often quite adequate for personal use or small sites.
For more heavy duty use, multilevel backups are more
appropriate.
<P>
The simple method has two backup levels: full and incremental
backups. This can be generalized to any number of levels.
A full backup would be level 0, and the different levels of
incremental backups levels 1, 2, 3, ...At each incremental
backup level you back up everything that has changed since
the previous backup at the same or a previous level.
<P>
The purpose for doing this is that it allows a longer
<b>backup history</b> cheaply. In the example in the previous
section, the backup history went back to the previous full backup.
This could be extended by having more tapes, but only a week
per new tape, which might be too expensive. A longer backup
history is useful, since deleted or corrupted files are often
not noticed for a long time. Even a version of a file that is
not very up to date is better than no file at all.
<P>
With multiple levels the backup history can be extended
more cheaply. For example, if we buy ten tapes, we could use
tapes 1 and 2 for monthly backups (first Friday each month),
tapes 3 to 6 for weekly backups (other Fridays; note that
there can be five Fridays in one month, so we need four more
tapes), and tapes 7 to 10 for daily backups (Monday to Thursday).
With only four more tapes, we've been able to extend the backup
history from two weeks (after all daily tapes have been
used) to two months. It is true that we can't restore every
version of each file during those two months, but what we can
restore is often good enough.
<P>
Figure <A HREF="node103.html#figbackuphistorytimeline">10.1</A> shows which backup level
is used each day, and which backups can be restored from
at the end of the month.
<P>
<P><A NAME="2983"> </A><A NAME="figbackuphistorytimeline"> </A><IMG WIDTH=592 HEIGHT=96 ALIGN=BOTTOM ALT="figure2979" SRC="img14.gif"><BR>
<STRONG>Figure 10.1:</STRONG> A sample multilevel backup schedule.<BR>
<P>
<P>
Backup levels can also be used to keep filesystem restoration
time to a minimum. If you have many incremental backups with
monotonously growing level numbers, you need to restore all
of them if you need to rebuild the whole filesystem. Instead
you can use level numbers that aren't monotonous, and keep down the
number of backups to restore.
<P>
To minimize the number of tapes needed to restore, you could
use a smaller level for each incremental tape. However, then
the time to make the backups increases (each backup copies
everything since the previous full backup). A better scheme
is suggested by the <tt>dump</tt><A NAME="3081"> </A> manual page and described by the
table <A HREF="node103.html#tabefficientbackuplevels">10.2</A>. Use the following
succession of backup levels: 3, 2, 5, 4, 7, 6, 9, 8, 9...This
keeps both the backup and restore times low. The most you
have to backup is two day's worth of work. The number of tapes
for a restore depends on how long you keep between full backups,
but it is less than in the simple schemes.
<P>
<P><A NAME="2989"> </A><A NAME="tabefficientbackuplevels"> </A><IMG WIDTH=360 HEIGHT=302 ALIGN=BOTTOM ALT="figure2988" SRC="img15.gif"><BR>
<STRONG>Figure 10.2:</STRONG> Efficient backup scheme using many backup levels<BR>
<P>
<P>
A fancy scheme can reduce the amount of labor needed, but it
does mean there are more things to keep track of. You must
decide if it is worth it.
<P>
<tt>dump</tt><A NAME="3083"> </A> has built-in support for backup levels. For
<tt>tar</tt><A NAME="3085"> </A> and <tt>cpio</tt><A NAME="3087"> </A> it must be implemented with shell
scripts.
<P>
<HR><A NAME="tex2html1613" HREF="node104.html"><IMG WIDTH=37 HEIGHT=24 ALIGN=BOTTOM ALT="next" SRC="./next_motif.gif"></A> <A NAME="tex2html1611" HREF="node96.html"><IMG WIDTH=26 HEIGHT=24 ALIGN=BOTTOM ALT="up" SRC="./up_motif.gif"></A> <A NAME="tex2html1605" HREF="node102.html"><IMG WIDTH=63 HEIGHT=24 ALIGN=BOTTOM ALT="previous" SRC="./previous_motif.gif"></A> <A NAME="tex2html1615" HREF="node1.html"><IMG WIDTH=65 HEIGHT=24 ALIGN=BOTTOM ALT="contents" SRC="./contents_motif.gif"></A> <A NAME="tex2html1616" HREF="node114.html"><IMG WIDTH=43 HEIGHT=24 ALIGN=BOTTOM ALT="index" SRC="./index_motif.gif"></A> <BR>
<B> Next:</B> <A NAME="tex2html1614" HREF="node104.html">What to back up</A>
<B>Up:</B> <A NAME="tex2html1612" HREF="node96.html">Backups</A>
<B> Previous:</B> <A NAME="tex2html1606" HREF="node102.html">Restoring files with tar</A>
<P><ADDRESS>
<I>Lars Wirzenius <BR>
Sat Nov 15 02:32:11 EET 1997</I>
</ADDRESS>
</BODY>
</HTML>
|