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
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
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
“<span class="quote">confused</span>” 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).
48
See <a href="ch04s07.html" title="Configuring your SCSI Device">the section called “Configuring your SCSI Device”</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.
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.
76
See <a href="ch04s07.html" title="Configuring your Writer Device">the section called “Configuring your Writer Device”</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 “<span class="quote">ready made</span>” 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
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
“<span class="quote">confused</span>” until either the next week, or until you
122
re-run the backup using the <code class="option">--full</code> flag.
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
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>
133
</p><pre class="programlisting">
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
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 “<span class="quote">Single machine (pool of
148
one)</span>” 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 “Configuration File Format”</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,
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
“<span class="quote">opened</span>” must be “<span class="quote">closed</span>” 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
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>
186
</p><pre class="programlisting">
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
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
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 “<span class="quote">Single machine (pool of
204
one)</span>” 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>