~ubuntu-branches/ubuntu/karmic/cedar-backup2/karmic

« back to all changes in this revision

Viewing changes to doc/manual/ch04s05.html

  • Committer: Bazaar Package Importer
  • Author(s): Kenneth J. Pronovici
  • Date: 2006-12-18 22:59:17 UTC
  • mfrom: (1.1.5 upstream)
  • Revision ID: james.westby@ubuntu.com-20061218225917-gwos76xdo3jewj6i
Tags: 2.9.0-1
* New upstream release.
  - Provide way to configure dev=/dev/cdrw and the like (closes: #403546).
  - Fix, clean up and reorganize parts of user manual (closes: #403448, #403662).

Show diffs side-by-side

added added

removed removed

Lines of Context:
1
 
<html><head><meta http-equiv="Content-Type" content="text/html; charset=ISO-8859-1"><title>Setting up a Client Peer Node</title><link rel="stylesheet" href="styles.css" type="text/css"><meta name="generator" content="DocBook XSL Stylesheets V1.70.1"><link rel="start" href="index.html" title="Cedar Backup Software Manual"><link rel="up" href="ch04.html" title="Chapter�4.�Configuration"><link rel="prev" href="ch04s04.html" title="Setting up a Pool of One"><link rel="next" href="ch04s06.html" title="Setting up a Master Peer Node"></head><body bgcolor="white" text="black" link="#0000FF" vlink="#840084" alink="#0000FF"><div class="navheader"><table width="100%" summary="Navigation header"><tr><th colspan="3" align="center">Setting up a Client Peer Node</th></tr><tr><td width="20%" align="left"><a accesskey="p" href="ch04s04.html">Prev</a>�</td><th width="60%" align="center">Chapter�4.�Configuration</th><td width="20%" align="right">�<a accesskey="n" href="ch04s06.html">Next</a></td></tr></table><hr></div><div class="sect1" lang="en"><div class="titlepage"><div><div><h2 class="title" style="clear: both"><a name="cedar-config-client"></a>Setting up a Client Peer Node</h2></div></div></div><p>
 
1
<html><head><meta http-equiv="Content-Type" content="text/html; charset=ISO-8859-1"><title>Setting up a Client Peer Node</title><link rel="stylesheet" href="styles.css" type="text/css"><meta name="generator" content="DocBook XSL Stylesheets V1.71.0"><link rel="start" href="index.html" title="Cedar Backup Software Manual"><link rel="up" href="ch04.html" title="Chapter�4.�Configuration"><link rel="prev" href="ch04s04.html" title="Setting up a Pool of One"><link rel="next" href="ch04s06.html" title="Setting up a Master Peer Node"></head><body bgcolor="white" text="black" link="#0000FF" vlink="#840084" alink="#0000FF"><div class="navheader"><table width="100%" summary="Navigation header"><tr><th colspan="3" align="center">Setting up a Client Peer Node</th></tr><tr><td width="20%" align="left"><a accesskey="p" href="ch04s04.html">Prev</a>�</td><th width="60%" align="center">Chapter�4.�Configuration</th><td width="20%" align="right">�<a accesskey="n" href="ch04s06.html">Next</a></td></tr></table><hr></div><div class="sect1" lang="en"><div class="titlepage"><div><div><h2 class="title" style="clear: both"><a name="cedar-config-client"></a>Setting up a Client Peer Node</h2></div></div></div><p>
2
2
         Cedar Backup has been designed to backup entire &#8220;<span class="quote">pools</span>&#8221;
3
3
         of machines.  In any given pool, there is one master and some number
4
4
         of clients.  Most of the work takes place on the master, so
18
18
      </p><p>
19
19
         Note: all of these configuration steps should be run as the root user,
20
20
         unless otherwise indicated.
21
 
      </p><div class="sect2" lang="en"><div class="titlepage"><div><div><h3 class="title"><a name="id2560953"></a>Step 1: Make sure email works.</h3></div></div></div><p>
 
21
      </p><div class="sect2" lang="en"><div class="titlepage"><div><div><h3 class="title"><a name="id2552836"></a>Step 1: Decide when you will run your backup.</h3></div></div></div><p>
 
22
            There are four parts to a Cedar Backup run: collect, stage, store
 
23
            and purge. The usual way of setting off these steps is through a
 
24
            set of cron jobs.  Although you won't create your cron jobs just
 
25
            yet, you should decide now when you will run your backup so you are
 
26
            prepared for later.
 
27
         </p><p>
 
28
            Backing up large directories and creating ISO CD images can be
 
29
            intensive operations, and could slow your computer down
 
30
            significantly. Choose a backup time that will not interfere with
 
31
            normal use of your computer.  Usually, you will want the backup to
 
32
            occur every day, but it is possible to configure cron to execute
 
33
            the backup only one day per week, three days per week, etc.
 
34
         </p><div class="warning" style="margin-left: 0.5in; margin-right: 0.5in;"><h3 class="title">Warning</h3><p>
 
35
               Because of the way Cedar Backup works, you must ensure that your
 
36
               backup <span class="emphasis"><em>always</em></span> runs on the first day of your
 
37
               configured week.  This is because Cedar Backup will only clear
 
38
               incremental backup information and re-initialize your media when
 
39
               running on the first day of the week.  If you skip running Cedar
 
40
               Backup on the first day of the week, your backups will likely be
 
41
               &#8220;<span class="quote">confused</span>&#8221; until the next week begins, or until you
 
42
               re-run the backup using the <code class="option">--full</code> flag.
 
43
            </p></div></div><div class="sect2" lang="en"><div class="titlepage"><div><div><h3 class="title"><a name="id2552894"></a>Step 2: Make sure email works.</h3></div></div></div><p>
22
44
            Cedar Backup relies on email for problem notification.  This
23
45
            notification works through the magic of cron.  Cron will email any
24
46
            output from each job it executes to the user associated with the
33
55
            that you may prefer to configure root's email to forward to some
34
56
            other user, so you do not need to check the root user's mail in
35
57
            order to see Cedar Backup errors.
36
 
         </p></div><div class="sect2" lang="en"><div class="titlepage"><div><div><h3 class="title"><a name="id2560493"></a>Step 2: Configure the master in your backup pool.</h3></div></div></div><p>
 
58
         </p></div><div class="sect2" lang="en"><div class="titlepage"><div><div><h3 class="title"><a name="id2552935"></a>Step 3: Configure the master in your backup pool.</h3></div></div></div><p>
37
59
            You will not be able to complete the client configuration until at
38
60
            least step 3 of the master's configuration has been completed. In
39
61
            particular, you will need to know the master's public SSH identity
47
69
ssh-rsa AAAAB3NzaC1yc2EAAAABIwAAAIEA0vOKjlfwohPg1oPRdrmwHk75l3mI9Tb/WRZfVnu2Pw69
48
70
uyphM9wBLRo6QfOC2T8vZCB8o/ZIgtAM3tkM0UgQHxKBXAZ+H36TOgg7BcI20I93iGtzpsMA/uXQy8kH
49
71
HgZooYqQ9pw+ZduXgmPcAAv2b5eTm07wRqFt/U84k6bhTzs= user@machine
50
 
         </pre></div><div class="sect2" lang="en"><div class="titlepage"><div><div><h3 class="title"><a name="id2560537"></a>Step 3: Configure your backup user.</h3></div></div></div><p>
 
72
         </pre></div><div class="sect2" lang="en"><div class="titlepage"><div><div><h3 class="title"><a name="id2552979"></a>Step 4: Configure your backup user.</h3></div></div></div><p>
51
73
             Choose a user to be used for backups. Some platforms may come with
52
74
             a "ready made" backup user. For other platforms, you may have to
53
75
             create a user yourself. You may choose any id you like, but a
96
118
            to do things your way.  The important part is that the master must
97
119
            be able to SSH into a client <span class="emphasis"><em>with no password entry
98
120
            required</em></span>.
99
 
         </p></div><div class="sect2" lang="en"><div class="titlepage"><div><div><h3 class="title"><a name="id2560708"></a>Step 4: Create your backup tree.</h3></div></div></div><p>
 
121
         </p></div><div class="sect2" lang="en"><div class="titlepage"><div><div><h3 class="title"><a name="id2553150"></a>Step 5: Create your backup tree.</h3></div></div></div><p>
100
122
            Cedar Backup requires a backup directory tree on disk. This
101
123
            directory tree must be roughly as big as the amount of data that
102
124
            will be backed up on a nightly basis (more if you elect not to
128
150
               within some existing Debian directory such as
129
151
               <code class="filename">/var/backups</code> or
130
152
               <code class="filename">/var/tmp</code>.
131
 
            </p></div></div><div class="sect2" lang="en"><div class="titlepage"><div><div><h3 class="title"><a name="id2561566"></a>Step 5: Modify the backup cron jobs.</h3></div></div></div><p>
132
 
            There are two parts to a Cedar Backup run on a client: collect
133
 
            and purge. The usual way of setting off these steps is through a
134
 
            cron job.  For more information on using cron, see the manpage for
135
 
            crontab(5).
136
 
         </p><p>
137
 
            Backing up large directories could slow your computer down
138
 
            significantly. Choose a backup time that will not interfere with
139
 
            normal use of your computer.  Usually, you will want the backup to
140
 
            go occur every day, but it is possible to configure cron to 
141
 
            execute the backup only one day per week, three days per week,
142
 
            etc.
143
 
         </p><div class="warning" style="margin-left: 0.5in; margin-right: 0.5in;"><h3 class="title">Warning</h3><p>
144
 
               Because of the way Cedar Backup works, you must ensure that at
145
 
               least your collect action <span class="emphasis"><em>always</em></span> runs on
146
 
               the first day of your configured week.  This is because Cedar
147
 
               Backup will only clear incremental backup information when
148
 
               running on the first day of the week.  If you skip running the
149
 
               collect action on the first day of the week, your backups will
150
 
               likely be &#8220;<span class="quote">confused</span>&#8221; until either the next week, or
151
 
               until you re-run the collect action backup using the
152
 
               <code class="option">--full</code> flag.
153
 
            </p></div><p>
154
 
            Since Cedar Backup should be run as root, you should add a set of
155
 
            lines like this to your <code class="filename">/etc/crontab</code> file:
156
 
         </p><pre class="programlisting">
157
 
30 00 * * * root  cback collect
158
 
30 06 * * * root  cback purge
159
 
         </pre><p>
160
 
            You should consider adding the <code class="option">--output</code> or
161
 
            <code class="option">-O</code> switch to your <span><strong class="command">cback</strong></span>
162
 
            command-line in cron.  This will result in larger logs, but could
163
 
            help diagnose problems when commands like
164
 
            <span><strong class="command">cdrecord</strong></span> or <span><strong class="command">mkisofs</strong></span> fail
165
 
            mysteriously.
166
 
         </p><p>
167
 
            You will need to coordinate the collect and purge actions on the
168
 
            client so that the collect action completes before the master
169
 
            attempts to stage, and so that the purge action does not begin
170
 
            until after the master has completed staging.  Usually, allowing an
171
 
            hour or two between steps should be sufficient.  <sup>[<a name="cedar-config-foot-coordinate" href="#ftn.cedar-config-foot-coordinate">29</a>]</sup>
172
 
         </p><div class="note" style="margin-left: 0.5in; margin-right: 0.5in;"><h3 class="title">Note</h3><p>
173
 
               On a Debian system, execution of daily backups is controlled by
174
 
               the file <code class="filename">/etc/cron.d/cedar-backup2</code>.  As
175
 
               installed, this file contains several different settings, all
176
 
               commented out.  Uncomment the &#8220;<span class="quote">Client machine</span>&#8221;
177
 
               entries in the file, and change the lines so that the backup
178
 
               goes off when you want it to.
179
 
            </p></div></div><div class="sect2" lang="en"><div class="titlepage"><div><div><h3 class="title"><a name="id2561729"></a>Step 6: Create the Cedar Backup configuration file.</h3></div></div></div><p>
 
153
            </p></div></div><div class="sect2" lang="en"><div class="titlepage"><div><div><h3 class="title"><a name="id2553241"></a>Step 6: Create the Cedar Backup configuration file.</h3></div></div></div><p>
180
154
            Following the instructions in <a href="ch04s03.html" title="Configuration File Format">the section called &#8220;Configuration File Format&#8221;</a> (above), create a configuration
181
155
            file for your machine.  Since you are working with a client, you
182
156
            must configure all action-specific sections for the collect and
184
158
         </p><p>
185
159
            The usual location for the Cedar Backup config file is
186
160
            <code class="filename">/etc/cback.conf</code>.  If you change the location,
187
 
            make sure you edit your cronjobs (step 5) to point the
 
161
            make sure you edit your cronjobs (below) to point the
188
162
            <span><strong class="command">cback</strong></span> script at the correct config file (using
189
163
            the <code class="option">--config</code> option).
190
164
         </p><div class="warning" style="margin-left: 0.5in; margin-right: 0.5in;"><h3 class="title">Warning</h3><p>
197
171
               configure any extensions that require passwords or other similar
198
172
               information, you should make the file readable only to root or
199
173
               to the file owner (if the owner is not root).
200
 
            </p></div></div><div class="sect2" lang="en"><div class="titlepage"><div><div><h3 class="title"><a name="id2561797"></a>Step 7: Validate the Cedar Backup configuration file.</h3></div></div></div><p>
 
174
            </p></div></div><div class="sect2" lang="en"><div class="titlepage"><div><div><h3 class="title"><a name="id2553310"></a>Step 7: Validate the Cedar Backup configuration file.</h3></div></div></div><p>
201
175
            Use the command <span><strong class="command">cback validate</strong></span> to validate your
202
176
            configuration file. This command checks that the configuration file
203
177
            can be found and parsed, and also checks for typical configuration
208
182
            Note: the most common cause of configuration problems is in not
209
183
            closing XML tags properly. Any XML tag that is
210
184
            &#8220;<span class="quote">opened</span>&#8221; must be &#8220;<span class="quote">closed</span>&#8221; appropriately.
211
 
         </p></div><div class="sect2" lang="en"><div class="titlepage"><div><div><h3 class="title"><a name="id2561840"></a>Step 8: Test your backup.</h3></div></div></div><p>
 
185
         </p></div><div class="sect2" lang="en"><div class="titlepage"><div><div><h3 class="title"><a name="id2553353"></a>Step 8: Test your backup.</h3></div></div></div><p>
212
186
            Use the command <span><strong class="command">cback --full collect purge</strong></span>.  If the 
213
187
            command completes with no output, then the backup was run successfully.
214
188
            Just to be sure that everything worked properly, check the logfile 
215
189
            (<code class="filename">/var/log/cback.log</code>) for errors.
216
 
         </p></div><div class="footnotes"><br><hr width="100" align="left"><div class="footnote"><p><sup>[<a name="ftn.cedar-config-foot-coordinate" href="#cedar-config-foot-coordinate">29</a>] </sup>See <a href="ch02s05.html" title="Coordination between Master and Clients">the section called &#8220;Coordination between Master and Clients&#8221;</a> in <a href="ch02.html" title="Chapter�2.�Basic Concepts">Chapter�2, <i>Basic Concepts</i></a>.</p></div></div></div><div class="navfooter"><hr><table width="100%" summary="Navigation footer"><tr><td width="40%" align="left"><a accesskey="p" href="ch04s04.html">Prev</a>�</td><td width="20%" align="center"><a accesskey="u" href="ch04.html">Up</a></td><td width="40%" align="right">�<a accesskey="n" href="ch04s06.html">Next</a></td></tr><tr><td width="40%" align="left" valign="top">Setting up a Pool of One�</td><td width="20%" align="center"><a accesskey="h" href="index.html">Home</a></td><td width="40%" align="right" valign="top">�Setting up a Master Peer Node</td></tr></table></div></body></html>
 
190
         </p></div><div class="sect2" lang="en"><div class="titlepage"><div><div><h3 class="title"><a name="id2553383"></a>Step 9: Modify the backup cron jobs.</h3></div></div></div><p>
 
191
            Since Cedar Backup should be run as root, you should add a set of
 
192
            lines like this to your <code class="filename">/etc/crontab</code> file:
 
193
         </p><pre class="programlisting">
 
194
30 00 * * * root  cback collect
 
195
30 06 * * * root  cback purge
 
196
         </pre><p>
 
197
            You should consider adding the <code class="option">--output</code> or
 
198
            <code class="option">-O</code> switch to your <span><strong class="command">cback</strong></span>
 
199
            command-line in cron.  This will result in larger logs, but could
 
200
            help diagnose problems when commands like
 
201
            <span><strong class="command">cdrecord</strong></span> or <span><strong class="command">mkisofs</strong></span> fail
 
202
            mysteriously.
 
203
         </p><p>
 
204
            You will need to coordinate the collect and purge actions on the
 
205
            client so that the collect action completes before the master
 
206
            attempts to stage, and so that the purge action does not begin
 
207
            until after the master has completed staging.  Usually, allowing an
 
208
            hour or two between steps should be sufficient.  <sup>[<a name="cedar-config-foot-coordinate" href="#ftn.cedar-config-foot-coordinate">29</a>]</sup>
 
209
         </p><div class="note" style="margin-left: 0.5in; margin-right: 0.5in;"><h3 class="title">Note</h3><p>
 
210
               For general information about using cron, see the manpage for
 
211
               crontab(5).
 
212
            </p><p>
 
213
               On a Debian system, execution of daily backups is controlled by
 
214
               the file <code class="filename">/etc/cron.d/cedar-backup2</code>.  As
 
215
               installed, this file contains several different settings, all
 
216
               commented out.  Uncomment the &#8220;<span class="quote">Client machine</span>&#8221;
 
217
               entries in the file, and change the lines so that the backup
 
218
               goes off when you want it to.
 
219
            </p></div></div><div class="footnotes"><br><hr width="100" align="left"><div class="footnote"><p><sup>[<a name="ftn.cedar-config-foot-coordinate" href="#cedar-config-foot-coordinate">29</a>] </sup>See <a href="ch02s05.html" title="Coordination between Master and Clients">the section called &#8220;Coordination between Master and Clients&#8221;</a> in <a href="ch02.html" title="Chapter�2.�Basic Concepts">Chapter�2, <i>Basic Concepts</i></a>.</p></div></div></div><div class="navfooter"><hr><table width="100%" summary="Navigation footer"><tr><td width="40%" align="left"><a accesskey="p" href="ch04s04.html">Prev</a>�</td><td width="20%" align="center"><a accesskey="u" href="ch04.html">Up</a></td><td width="40%" align="right">�<a accesskey="n" href="ch04s06.html">Next</a></td></tr><tr><td width="40%" align="left" valign="top">Setting up a Pool of One�</td><td width="20%" align="center"><a accesskey="h" href="index.html">Home</a></td><td width="40%" align="right" valign="top">�Setting up a Master Peer Node</td></tr></table></div></body></html>