~ubuntu-branches/debian/stretch/s3ql/stretch

« back to all changes in this revision

Viewing changes to doc/html/man/expire_backups.html

  • Committer: Bazaar Package Importer
  • Author(s): Nikolaus Rath
  • Date: 2011-07-01 14:02:17 UTC
  • Revision ID: james.westby@ubuntu.com-20110701140217-cyyclk7tusagxucf
Tags: upstream-1.0.1
Import upstream version 1.0.1

Show diffs side-by-side

added added

removed removed

Lines of Context:
 
1
 
 
2
 
 
3
<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN"
 
4
  "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
 
5
 
 
6
 
 
7
<html xmlns="http://www.w3.org/1999/xhtml">
 
8
  <head>
 
9
    <meta http-equiv="Content-Type" content="text/html; charset=utf-8" />
 
10
    
 
11
    <title>The expire_backups command &mdash; S3QL 1.0.1 documentation</title>
 
12
    
 
13
    <link rel="stylesheet" href="../_static/sphinxdoc.css" type="text/css" />
 
14
    <link rel="stylesheet" href="../_static/pygments.css" type="text/css" />
 
15
    
 
16
    <script type="text/javascript">
 
17
      var DOCUMENTATION_OPTIONS = {
 
18
        URL_ROOT:    '../',
 
19
        VERSION:     '1.0.1',
 
20
        COLLAPSE_INDEX: false,
 
21
        FILE_SUFFIX: '.html',
 
22
        HAS_SOURCE:  true
 
23
      };
 
24
    </script>
 
25
    <script type="text/javascript" src="../_static/jquery.js"></script>
 
26
    <script type="text/javascript" src="../_static/underscore.js"></script>
 
27
    <script type="text/javascript" src="../_static/doctools.js"></script>
 
28
    <link rel="author" title="About these documents" href="../about.html" />
 
29
    <link rel="top" title="S3QL 1.0.1 documentation" href="../index.html" />
 
30
    <link rel="up" title="Manpages" href="index.html" />
 
31
    <link rel="next" title="Further Resources / Getting Help" href="../resources.html" />
 
32
    <link rel="prev" title="The pcp command" href="pcp.html" /> 
 
33
  </head>
 
34
  <body>
 
35
    <div class="related">
 
36
      <h3>Navigation</h3>
 
37
      <ul>
 
38
        <li class="right" style="margin-right: 10px">
 
39
          <a href="../resources.html" title="Further Resources / Getting Help"
 
40
             accesskey="N">next</a></li>
 
41
        <li class="right" >
 
42
          <a href="pcp.html" title="The pcp command"
 
43
             accesskey="P">previous</a> |</li>
 
44
        <li><a href="../index.html">S3QL 1.0.1 documentation</a> &raquo;</li>
 
45
          <li><a href="index.html" accesskey="U">Manpages</a> &raquo;</li> 
 
46
      </ul>
 
47
    </div>
 
48
      <div class="sphinxsidebar">
 
49
        <div class="sphinxsidebarwrapper">
 
50
            <h3><a href="../index.html">Table Of Contents</a></h3>
 
51
            <ul class="current">
 
52
<li class="toctree-l1"><a class="reference internal" href="../about.html">About S3QL</a></li>
 
53
<li class="toctree-l1"><a class="reference internal" href="../installation.html">Installation</a></li>
 
54
<li class="toctree-l1"><a class="reference internal" href="../backends.html">Storage Backends</a></li>
 
55
<li class="toctree-l1"><a class="reference internal" href="../mkfs.html">File System Creation</a></li>
 
56
<li class="toctree-l1"><a class="reference internal" href="../adm.html">Managing Buckets</a></li>
 
57
<li class="toctree-l1"><a class="reference internal" href="../mount.html">Mounting</a></li>
 
58
<li class="toctree-l1"><a class="reference internal" href="../special.html">Advanced S3QL Features</a></li>
 
59
<li class="toctree-l1"><a class="reference internal" href="../umount.html">Unmounting</a></li>
 
60
<li class="toctree-l1"><a class="reference internal" href="../fsck.html">Checking for Errors</a></li>
 
61
<li class="toctree-l1"><a class="reference internal" href="../contrib.html">Contributed Programs</a></li>
 
62
<li class="toctree-l1"><a class="reference internal" href="../tips.html">Tips &amp; Tricks</a></li>
 
63
<li class="toctree-l1"><a class="reference internal" href="../issues.html">Known Issues</a></li>
 
64
<li class="toctree-l1 current"><a class="reference internal" href="index.html">Manpages</a><ul class="current">
 
65
<li class="toctree-l2"><a class="reference internal" href="mkfs.html">The <strong class="program">mkfs.s3ql</strong> command</a></li>
 
66
<li class="toctree-l2"><a class="reference internal" href="adm.html">The <strong class="program">s3qladm</strong> command</a></li>
 
67
<li class="toctree-l2"><a class="reference internal" href="mount.html">The <strong class="program">mount.s3ql</strong> command</a></li>
 
68
<li class="toctree-l2"><a class="reference internal" href="stat.html">The <strong class="program">s3qlstat</strong> command</a></li>
 
69
<li class="toctree-l2"><a class="reference internal" href="ctrl.html">The <strong class="program">s3qlctrl</strong> command</a></li>
 
70
<li class="toctree-l2"><a class="reference internal" href="cp.html">The <strong class="program">s3qlcp</strong> command</a></li>
 
71
<li class="toctree-l2"><a class="reference internal" href="rm.html">The <strong class="program">s3qlrm</strong> command</a></li>
 
72
<li class="toctree-l2"><a class="reference internal" href="lock.html">The <strong class="program">s3qllock</strong> command</a></li>
 
73
<li class="toctree-l2"><a class="reference internal" href="umount.html">The <strong class="program">umount.s3ql</strong> command</a></li>
 
74
<li class="toctree-l2"><a class="reference internal" href="fsck.html">The <strong class="program">fsck.s3ql</strong> command</a></li>
 
75
<li class="toctree-l2"><a class="reference internal" href="pcp.html">The <strong class="program">pcp</strong> command</a></li>
 
76
<li class="toctree-l2 current"><a class="current reference internal" href="">The <strong class="program">expire_backups</strong> command</a></li>
 
77
</ul>
 
78
</li>
 
79
<li class="toctree-l1"><a class="reference internal" href="../resources.html">Further Resources / Getting Help</a></li>
 
80
</ul>
 
81
 
 
82
          
 
83
          <div id="searchbox" style="display: none">
 
84
            <h3>Quick search</h3>
 
85
              <form class="search" action="../search.html" method="get">
 
86
                <input type="text" name="q" size="18" />
 
87
                <input type="submit" value="Go" />
 
88
                <input type="hidden" name="check_keywords" value="yes" />
 
89
                <input type="hidden" name="area" value="default" />
 
90
              </form>
 
91
              <p class="searchtip" style="font-size: 90%">
 
92
              Enter search terms.
 
93
              </p>
 
94
          </div>
 
95
          <script type="text/javascript">$('#searchbox').show(0);</script>
 
96
        </div>
 
97
      </div>
 
98
 
 
99
    <div class="document">
 
100
      <div class="documentwrapper">
 
101
        <div class="bodywrapper">
 
102
          <div class="body">
 
103
            
 
104
  <div class="section" id="the-expire-backups-command">
 
105
<h1>The <strong class="program">expire_backups</strong> command<a class="headerlink" href="#the-expire-backups-command" title="Permalink to this headline">¶</a></h1>
 
106
<div class="section" id="synopsis">
 
107
<h2>Synopsis<a class="headerlink" href="#synopsis" title="Permalink to this headline">¶</a></h2>
 
108
<div class="highlight-commandline"><div class="highlight"><pre><span class="l">expire_backups </span><span class="ge">[options]</span><span class="l"> </span><span class="nv">&lt;age&gt;</span><span class="l"> </span><span class="ge">[&lt;age&gt; ...]</span><span class="l"></span>
 
109
</pre></div>
 
110
</div>
 
111
</div>
 
112
<div class="section" id="description">
 
113
<h2>Description<a class="headerlink" href="#description" title="Permalink to this headline">¶</a></h2>
 
114
<p>The <strong class="command">expire_backups</strong> command intelligently remove old backups that are no
 
115
longer needed.</p>
 
116
<p>To define what backups you want to keep for how long, you define a
 
117
number of <em>age ranges</em>. <strong class="program">expire_backups</strong> ensures that you
 
118
will have at least one backup in each age range at all times. It will
 
119
keep exactly as many backups as are required for that and delete any
 
120
backups that become redundant.</p>
 
121
<p>Age ranges are specified by giving a list of range boundaries in terms
 
122
of backup cycles. Every time you create a new backup, the existing
 
123
backups age by one cycle.</p>
 
124
<p>Example: when <strong class="program">expire_backups</strong> is called with the age range
 
125
definition <tt class="docutils literal"><span class="pre">1</span> <span class="pre">3</span> <span class="pre">7</span> <span class="pre">14</span> <span class="pre">31</span></tt>, it will guarantee that you always have the
 
126
following backups available:</p>
 
127
<ol class="arabic simple">
 
128
<li>A backup that is 0 to 1 cycles old (i.e, the most recent backup)</li>
 
129
<li>A backup that is 1 to 3 cycles old</li>
 
130
<li>A backup that is 3 to 7 cycles old</li>
 
131
<li>A backup that is 7 to 14 cycles old</li>
 
132
<li>A backup that is 14 to 31 cycles old</li>
 
133
</ol>
 
134
<div class="admonition note">
 
135
<p class="first admonition-title">Note</p>
 
136
<p class="last">If you do backups in fixed intervals, then one cycle will be
 
137
equivalent to the backup interval. The advantage of specifying the
 
138
age ranges in terms of backup cycles rather than days or weeks is
 
139
that it allows you to gracefully handle irregular backup intervals.
 
140
Imagine that for some reason you do not turn on your computer for
 
141
one month. Now all your backups are at least a month old, and if you
 
142
had specified the above backup strategy in terms of absolute ages,
 
143
they would all be deleted! Specifying age ranges in terms of backup
 
144
cycles avoids these sort of problems.</p>
 
145
</div>
 
146
<p><strong class="program">expire_backups</strong> usage is simple. It requires backups to have
 
147
names of the forms <tt class="docutils literal"><span class="pre">year-month-day_hour:minute:seconds</span></tt>
 
148
(<tt class="docutils literal"><span class="pre">YYYY-MM-DD_HH:mm:ss</span></tt>) and works on all backups in the current
 
149
directory. So for the above backup strategy, the correct invocation
 
150
would be:</p>
 
151
<div class="highlight-commandline"><div class="highlight"><pre><span class="l">expire_backups.py 1 3 7 14 31</span>
 
152
</pre></div>
 
153
</div>
 
154
<p>When storing your backups on an S3QL file system, you probably want to
 
155
specify the <tt class="docutils literal"><span class="pre">--use-s3qlrm</span></tt> option as well. This tells
 
156
<strong class="program">expire_backups</strong> to use the <a class="reference internal" href="../special.html#s3qlrm"><em>s3qlrm</em></a> command to
 
157
delete directories.</p>
 
158
<p><strong class="program">expire_backups</strong> uses a &#8220;state file&#8221; to keep track which
 
159
backups are how many cycles old (since this cannot be inferred from
 
160
the dates contained in the directory names). The standard name for
 
161
this state file is <tt class="file docutils literal"><span class="pre">.expire_backups.dat</span></tt>. If this file gets
 
162
damaged or deleted, <strong class="program">expire_backups</strong> no longer knows the ages
 
163
of the backups and refuses to work. In this case you can use the
 
164
<tt class="cmdopt docutils literal"><span class="pre">--reconstruct-state</span></tt> option to try to reconstruct the state
 
165
from the backup dates. However, the accuracy of this reconstruction
 
166
depends strongly on how rigorous you have been with making backups (it
 
167
is only completely correct if the time between subsequent backups has
 
168
always been exactly the same), so it&#8217;s generally a good idea not to
 
169
tamper with the state file.</p>
 
170
</div>
 
171
<div class="section" id="options">
 
172
<h2>Options<a class="headerlink" href="#options" title="Permalink to this headline">¶</a></h2>
 
173
<p>The <strong class="command">expire_backups</strong> command accepts the following options:</p>
 
174
<blockquote>
 
175
<div><table class="docutils option-list" frame="void" rules="none">
 
176
<col class="option" />
 
177
<col class="description" />
 
178
<tbody valign="top">
 
179
<tr><td class="option-group">
 
180
<kbd><span class="option">--quiet</span></kbd></td>
 
181
<td>be really quiet</td></tr>
 
182
<tr><td class="option-group">
 
183
<kbd><span class="option">--debug</span></kbd></td>
 
184
<td>activate debugging output</td></tr>
 
185
<tr><td class="option-group">
 
186
<kbd><span class="option">--version</span></kbd></td>
 
187
<td>just print program version and exit</td></tr>
 
188
<tr><td class="option-group">
 
189
<kbd><span class="option">--state <var>&lt;file&gt;</var></span></kbd></td>
 
190
<td>File to save state information in (default:
 
191
&#8221;.expire_backups.dat&#8221;)</td></tr>
 
192
<tr><td class="option-group">
 
193
<kbd><span class="option">-n</span></kbd></td>
 
194
<td>Dry run. Just show which backups would be deleted.</td></tr>
 
195
<tr><td class="option-group" colspan="2">
 
196
<kbd><span class="option">--reconstruct-state</span></kbd></td>
 
197
</tr>
 
198
<tr><td>&nbsp;</td><td>Try to reconstruct a missing state file from backup
 
199
dates.</td></tr>
 
200
<tr><td class="option-group">
 
201
<kbd><span class="option">--use-s3qlrm</span></kbd></td>
 
202
<td>Use <tt class=" docutils literal"><span class="pre">s3qlrm</span></tt> command to delete backups.</td></tr>
 
203
</tbody>
 
204
</table>
 
205
</div></blockquote>
 
206
</div>
 
207
<div class="section" id="exit-status">
 
208
<h2>Exit Status<a class="headerlink" href="#exit-status" title="Permalink to this headline">¶</a></h2>
 
209
<p><strong class="command">expire_backups</strong> returns exit code 0 if the operation succeeded and 1 if some
 
210
error occured.</p>
 
211
</div>
 
212
<div class="section" id="see-also">
 
213
<h2>See Also<a class="headerlink" href="#see-also" title="Permalink to this headline">¶</a></h2>
 
214
<p><strong class="command">expire_backups</strong> is shipped as part of S3QL, <a class="reference external" href="http://code.google.com/p/s3ql/">http://code.google.com/p/s3ql/</a>.</p>
 
215
</div>
 
216
</div>
 
217
 
 
218
 
 
219
          </div>
 
220
        </div>
 
221
      </div>
 
222
      <div class="clearer"></div>
 
223
    </div>
 
224
    <div class="related">
 
225
      <h3>Navigation</h3>
 
226
      <ul>
 
227
        <li class="right" style="margin-right: 10px">
 
228
          <a href="../resources.html" title="Further Resources / Getting Help"
 
229
             >next</a></li>
 
230
        <li class="right" >
 
231
          <a href="pcp.html" title="The pcp command"
 
232
             >previous</a> |</li>
 
233
        <li><a href="../index.html">S3QL 1.0.1 documentation</a> &raquo;</li>
 
234
          <li><a href="index.html" >Manpages</a> &raquo;</li> 
 
235
      </ul>
 
236
    </div>
 
237
    <div class="footer">
 
238
        &copy; Copyright 2008-2011, Nikolaus Rath.
 
239
      Created using <a href="http://sphinx.pocoo.org/">Sphinx</a> 1.1pre.
 
240
    </div>
 
241
  </body>
 
242
</html>
 
 
b'\\ No newline at end of file'