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

« back to all changes in this revision

Viewing changes to doc/manual/ch04s04.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 Pool of One</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="ch04s03.html" title="Configuration File Format"><link rel="next" href="ch04s05.html" title="Setting up a Client 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 Pool of One</th></tr><tr><td width="20%" align="left"><a accesskey="p" href="ch04s03.html">Prev</a>�</td><th width="60%" align="center">Chapter�4.�Configuration</th><td width="20%" align="right">�<a accesskey="n" href="ch04s05.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-poolofone"></a>Setting up a Pool of One</h2></div></div></div><p>
 
1
<html><head><meta http-equiv="Content-Type" content="text/html; charset=ISO-8859-1"><title>Setting up a Pool of One</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="ch04s03.html" title="Configuration File Format"><link rel="next" href="ch04s05.html" title="Setting up a Client 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 Pool of One</th></tr><tr><td width="20%" align="left"><a accesskey="p" href="ch04s03.html">Prev</a>�</td><th width="60%" align="center">Chapter�4.�Configuration</th><td width="20%" align="right">�<a accesskey="n" href="ch04s05.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-poolofone"></a>Setting up a Pool of One</h2></div></div></div><p>
2
2
         Cedar Backup has been designed primarily for situations where there is
3
3
         a single master and a set of other clients that the master interacts
4
4
         with.  However, it will just as easily work for a single machine (a
20
20
            directory), you can do that.  You'll just have to modify the
21
21
            procedure below based on information in the remainder of the
22
22
            manual.
23
 
         </p></div><div class="sect2" lang="en"><div class="titlepage"><div><div><h3 class="title"><a name="id2560210"></a>Step 1: Make sure email works.</h3></div></div></div><p>
 
23
         </p></div><div class="sect2" lang="en"><div class="titlepage"><div><div><h3 class="title"><a name="id2552186"></a>Step 1: Decide when you will run your backup.</h3></div></div></div><p>
 
24
            There are four parts to a Cedar Backup run: collect, stage, store
 
25
            and purge. The usual way of setting off these steps is through a
 
26
            set of cron jobs.  Although you won't create your cron jobs just
 
27
            yet, you should decide now when you will run your backup so you are
 
28
            prepared for later.
 
29
         </p><p>
 
30
            Backing up large directories and creating ISO CD images can be
 
31
            intensive operations, and could slow your computer down
 
32
            significantly. Choose a backup time that will not interfere with
 
33
            normal use of your computer.  Usually, you will want the backup to
 
34
            occur every day, but it is possible to configure cron to execute
 
35
            the backup only one day per week, three days per week, etc.
 
36
         </p><div class="warning" style="margin-left: 0.5in; margin-right: 0.5in;"><h3 class="title">Warning</h3><p>
 
37
               Because of the way Cedar Backup works, you must ensure that your
 
38
               backup <span class="emphasis"><em>always</em></span> runs son the first day of your
 
39
               configured week.  This is because Cedar Backup will only clear
 
40
               incremental backup information and re-initialize your media when
 
41
               running on the first day of the week.  If you skip running Cedar
 
42
               Backup on the first day of the week, your backups will likely be
 
43
               &#8220;<span class="quote">confused</span>&#8221; until the next week begins, or until you
 
44
               re-run the backup using the <code class="option">--full</code> flag.
 
45
            </p></div></div><div class="sect2" lang="en"><div class="titlepage"><div><div><h3 class="title"><a name="id2552252"></a>Step 2: Make sure email works.</h3></div></div></div><p>
24
46
            Cedar Backup relies on email for problem notification.  This
25
47
            notification works through the magic of cron.  Cron will email any
26
48
            output from each job it executes to the user associated with the
35
57
            that you may prefer to configure root's email to forward to some
36
58
            other user, so you do not need to check the root user's mail in
37
59
            order to see Cedar Backup errors.
38
 
         </p></div><div class="sect2" lang="en"><div class="titlepage"><div><div><h3 class="title"><a name="id2560244"></a>Step 2: Configure your CD-R or CD-RW drive.</h3></div></div></div><p>
39
 
            Your CD-R or CD-RW drive must either be a SCSI device or must be
40
 
            configured to act like a SCSI device from the perspective of the
41
 
            <span><strong class="command">cdrecord</strong></span> and <span><strong class="command">mkisofs</strong></span>
42
 
            commands.  Regardless of what kind of drive you have, make sure you
43
 
            know its SCSI address and its filesystem device name.  The SCSI
44
 
            address will be used to write to media, and the device name will be
45
 
            used when Cedar Backup needs to mount the media (for instance, when
46
 
            a validation check must be run).
47
 
         </p><p>
48
 
            See <a href="ch04s07.html" title="Configuring your SCSI Device">the section called &#8220;Configuring your SCSI Device&#8221;</a> for more
49
 
            information on SCSI devices and how they are configured.
 
60
         </p></div><div class="sect2" lang="en"><div class="titlepage"><div><div><h3 class="title"><a name="id2552285"></a>Step 3: Configure your CD-R or CD-RW drive.</h3></div></div></div><p>
 
61
            Before using Cedar Backup, your writer device must be properly
 
62
            configured.  If you have configured your CD writer hardware to work
 
63
            through the normal filesystem device path, then you just need to
 
64
            know the path to the device on disk (something like
 
65
            <code class="filename">/dev/cdrw</code>).  Cedar Backup will use the this
 
66
            device path both when talking to <span><strong class="command">cdrecord</strong></span> and
 
67
            when doing filesystem operations like running media validation.
 
68
         </p><p>
 
69
            Your other option is to configure your writer hardware like a SCSI
 
70
            device (either because it <span class="emphasis"><em>is</em></span> a SCSI device or
 
71
            because you are using some sort of interface that makes it look
 
72
            like one).  In this case, Cedar Backup will use the SCSI id when
 
73
            talking to <span><strong class="command">cdrecord</strong></span> and the device path when
 
74
            running filesystem operations.
 
75
         </p><p>
 
76
            See <a href="ch04s07.html" title="Configuring your Writer Device">the section called &#8220;Configuring your Writer Device&#8221;</a> for more information on
 
77
            writer devices and how they are configured.
50
78
         </p><div class="note" style="margin-left: 0.5in; margin-right: 0.5in;"><h3 class="title">Note</h3><p>
51
79
               There is no need to set up your CD-R or CD-RW device if you
52
80
               have decided not to execute the store action.
53
 
            </p></div></div><div class="sect2" lang="en"><div class="titlepage"><div><div><h3 class="title"><a name="id2560299"></a>Step 3: Configure your backup user.</h3></div></div></div><p>
 
81
            </p></div></div><div class="sect2" lang="en"><div class="titlepage"><div><div><h3 class="title"><a name="id2552358"></a>Step 4: Configure your backup user.</h3></div></div></div><p>
54
82
             Choose a user to be used for backups. Some platforms may
55
83
             come with a &#8220;<span class="quote">ready made</span>&#8221; backup user. For other
56
84
             platforms, you may have to create a user yourself. You may
62
90
               Standard Debian systems come with a user named
63
91
               <code class="literal">backup</code>.  You may choose to stay with this
64
92
               user or create another one.
65
 
            </p></div></div><div class="sect2" lang="en"><div class="titlepage"><div><div><h3 class="title"><a name="id2560350"></a>Step 4: Create your backup tree.</h3></div></div></div><p>
 
93
            </p></div></div><div class="sect2" lang="en"><div class="titlepage"><div><div><h3 class="title"><a name="id2552410"></a>Step 5: Create your backup tree.</h3></div></div></div><p>
66
94
            Cedar Backup requires a backup directory tree on disk. This
67
95
            directory tree must be roughly three times as big as the amount of
68
96
            data that will be backed up on a nightly basis, to allow for the
99
127
               directory structure within some existing Debian directory such
100
128
               as <code class="filename">/var/backups</code> or
101
129
               <code class="filename">/var/tmp</code>.
102
 
            </p></div></div><div class="sect2" lang="en"><div class="titlepage"><div><div><h3 class="title"><a name="id2560452"></a>Step 5: Modify the backup cron jobs.</h3></div></div></div><p>
103
 
            There are four parts to a Cedar Backup run: collect, stage, store
104
 
            and purge. The usual way of setting off these steps is through a
105
 
            cron job.  For more information on using cron, see the manpage for
106
 
            crontab(5).
107
 
         </p><p>
108
 
            Backing up large directories and creating ISO CD images can be
109
 
            intensive operations, and could slow your computer down
110
 
            significantly. Choose a backup time that will not interfere with
111
 
            normal use of your computer.  Usually, you will want the backup to
112
 
            occur every day, but it is possible to configure cron to execute
113
 
            the backup only one day per week, three days per week, etc.
114
 
         </p><div class="warning" style="margin-left: 0.5in; margin-right: 0.5in;"><h3 class="title">Warning</h3><p>
115
 
               Because of the way Cedar Backup works, you must ensure that your
116
 
               backup <span class="emphasis"><em>always</em></span> run on the first day of your
117
 
               configured week.  This is because Cedar Backup will only clear
118
 
               incremental backup information and re-initialize your media when
119
 
               running on the first day of the week.  If you skip running Cedar
120
 
               Backup on the first day of the week, your backups will likely be
121
 
               &#8220;<span class="quote">confused</span>&#8221; until either the next week, or until you
122
 
               re-run the backup using the <code class="option">--full</code> flag.
123
 
            </p></div><p>
124
 
            Since Cedar Backup should be run as root, one way to configure the
125
 
            cron job is to add a line like this to your
126
 
            <code class="filename">/etc/crontab</code> file:
127
 
         </p><pre class="programlisting">
128
 
30 00 * * * root  cback all
129
 
         </pre><p>
130
 
            Or, you can create an executable script containing just these lines
131
 
            and place that file in the <code class="filename">/etc/cron.daily</code>
132
 
            directory:
133
 
         </p><pre class="programlisting">
134
 
#/bin/sh
135
 
cback all
136
 
         </pre><p>
137
 
            You should consider adding the <code class="option">--output</code> or
138
 
            <code class="option">-O</code> switch to your <span><strong class="command">cback</strong></span>
139
 
            command-line in cron.  This will result in larger logs, but could
140
 
            help diagnose problems when commands like
141
 
            <span><strong class="command">cdrecord</strong></span> or <span><strong class="command">mkisofs</strong></span> fail
142
 
            mysteriously.
143
 
         </p><div class="note" style="margin-left: 0.5in; margin-right: 0.5in;"><h3 class="title">Note</h3><p>
144
 
               On a Debian system, execution of daily backups is controlled by
145
 
               the file <code class="filename">/etc/cron.d/cedar-backup2</code>.  As
146
 
               installed, this file contains several different settings, all
147
 
               commented out.  Uncomment the &#8220;<span class="quote">Single machine (pool of
148
 
               one)</span>&#8221; entry in the file, and change the line so that the
149
 
               backup goes off when you want it to.
150
 
            </p></div></div><div class="sect2" lang="en"><div class="titlepage"><div><div><h3 class="title"><a name="id2555453"></a>Step 6: Create the Cedar Backup configuration file.</h3></div></div></div><p>
 
130
            </p></div></div><div class="sect2" lang="en"><div class="titlepage"><div><div><h3 class="title"><a name="id2552511"></a>Step 6: Create the Cedar Backup configuration file.</h3></div></div></div><p>
151
131
            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
152
132
            file for your machine.  Since you are working with a pool of one,
153
133
            you must configure all four action-specific sections: collect,
155
135
         </p><p>
156
136
            The usual location for the Cedar Backup config file is
157
137
            <code class="filename">/etc/cback.conf</code>.  If you change the location,
158
 
            make sure you edit your cronjobs (step 5) to point the
 
138
            make sure you edit your cronjobs (below) to point the
159
139
            <span><strong class="command">cback</strong></span> script at the correct config file (using
160
140
            the <code class="option">--config</code> option).
161
141
         </p><div class="warning" style="margin-left: 0.5in; margin-right: 0.5in;"><h3 class="title">Warning</h3><p>
168
148
               configure any extensions that require passwords or other similar
169
149
               information, you should make the file readable only to root or
170
150
               to the file owner (if the owner is not root).
171
 
            </p></div></div><div class="sect2" lang="en"><div class="titlepage"><div><div><h3 class="title"><a name="id2560801"></a>Step 7: Validate the Cedar Backup configuration file.</h3></div></div></div><p>
 
151
            </p></div></div><div class="sect2" lang="en"><div class="titlepage"><div><div><h3 class="title"><a name="id2552580"></a>Step 7: Validate the Cedar Backup configuration file.</h3></div></div></div><p>
172
152
            Use the command <span><strong class="command">cback validate</strong></span> to validate your
173
153
            configuration file. This command checks that the configuration file
174
154
            can be found and parsed, and also checks for typical configuration
177
157
            Note: the most common cause of configuration problems is in not
178
158
            closing XML tags properly. Any XML tag that is
179
159
            &#8220;<span class="quote">opened</span>&#8221; must be &#8220;<span class="quote">closed</span>&#8221; appropriately.
180
 
         </p></div><div class="sect2" lang="en"><div class="titlepage"><div><div><h3 class="title"><a name="id2560839"></a>Step 8: Test your backup.</h3></div></div></div><p>
 
160
         </p></div><div class="sect2" lang="en"><div class="titlepage"><div><div><h3 class="title"><a name="id2552618"></a>Step 8: Test your backup.</h3></div></div></div><p>
181
161
            Place a valid CD-R or CD-RW disc in your drive, and then use the
182
162
            command <span><strong class="command">cback --full all</strong></span>.  You should execute
183
163
            this command as root.  If the command completes with no output,
193
173
            <sup>[<a name="cedar-config-foot-bugzilla" href="#ftn.cedar-config-foot-bugzilla">28</a>]</sup>
194
174
            To be safe, always enable the consistency check option in the
195
175
            store configuration section.</em></span>
196
 
         </p></div><div class="footnotes"><br><hr width="100" align="left"><div class="footnote"><p><sup>[<a name="ftn.cedar-config-foot-bugzilla" href="#cedar-config-foot-bugzilla">28</a>] </sup>
 
176
         </p></div><div class="sect2" lang="en"><div class="titlepage"><div><div><h3 class="title"><a name="id2552684"></a>Step 9: Modify the backup cron jobs.</h3></div></div></div><p>
 
177
            Since Cedar Backup should be run as root, one way to configure the
 
178
            cron job is to add a line like this to your
 
179
            <code class="filename">/etc/crontab</code> file:
 
180
         </p><pre class="programlisting">
 
181
30 00 * * * root  cback all
 
182
         </pre><p>
 
183
            Or, you can create an executable script containing just these lines
 
184
            and place that file in the <code class="filename">/etc/cron.daily</code>
 
185
            directory:
 
186
         </p><pre class="programlisting">
 
187
#/bin/sh
 
188
cback all
 
189
         </pre><p>
 
190
            You should consider adding the <code class="option">--output</code> or
 
191
            <code class="option">-O</code> switch to your <span><strong class="command">cback</strong></span>
 
192
            command-line in cron.  This will result in larger logs, but could
 
193
            help diagnose problems when commands like
 
194
            <span><strong class="command">cdrecord</strong></span> or <span><strong class="command">mkisofs</strong></span> fail
 
195
            mysteriously.
 
196
         </p><div class="note" style="margin-left: 0.5in; margin-right: 0.5in;"><h3 class="title">Note</h3><p>
 
197
               For general information about using cron, see the manpage for
 
198
               crontab(5).
 
199
            </p><p>
 
200
               On a Debian system, execution of daily backups is controlled by
 
201
               the file <code class="filename">/etc/cron.d/cedar-backup2</code>.  As
 
202
               installed, this file contains several different settings, all
 
203
               commented out.  Uncomment the &#8220;<span class="quote">Single machine (pool of
 
204
               one)</span>&#8221; entry in the file, and change the line so that the
 
205
               backup goes off when you want it to.
 
206
            </p></div></div><div class="footnotes"><br><hr width="100" align="left"><div class="footnote"><p><sup>[<a name="ftn.cedar-config-foot-bugzilla" href="#cedar-config-foot-bugzilla">28</a>] </sup>
197
207
            See <a href="http://cedar-solutions.com/bugzilla/" target="_top">http://cedar-solutions.com/bugzilla/</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="ch04s03.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="ch04s05.html">Next</a></td></tr><tr><td width="40%" align="left" valign="top">Configuration File Format�</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 Client Peer Node</td></tr></table></div></body></html>