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
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
“<span class="quote">confused</span>” 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
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
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,
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 “<span class="quote">confused</span>” until either the next week, or
151
until you re-run the collect action backup using the
152
<code class="option">--full</code> flag.
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
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
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 “<span class="quote">Client machine</span>”
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 “Configuration File Format”</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
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
“<span class="quote">opened</span>” must be “<span class="quote">closed</span>” 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 “Coordination between Master and Clients”</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
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
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
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 “<span class="quote">Client machine</span>”
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 “Coordination between Master and Clients”</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>