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

« back to all changes in this revision

Viewing changes to doc/html/man/cp.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 s3qlcp 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="The s3qlrm command" href="rm.html" />
 
32
    <link rel="prev" title="The s3qlctrl command" href="ctrl.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="rm.html" title="The s3qlrm command"
 
40
             accesskey="N">next</a></li>
 
41
        <li class="right" >
 
42
          <a href="ctrl.html" title="The s3qlctrl 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 current"><a class="current reference internal" href="">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"><a class="reference internal" href="expire_backups.html">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-s3qlcp-command">
 
105
<h1>The <strong class="program">s3qlcp</strong> command<a class="headerlink" href="#the-s3qlcp-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">s3qlcp </span><span class="ge">[options]</span><span class="l"> </span><span class="nv">&lt;source-dir&gt;</span><span class="l"> </span><span class="nv">&lt;dest-dir&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">s3qlcp</strong> command duplicates the directory tree <tt class="var docutils literal"><span class="pre">source-dir</span></tt>
 
115
into <tt class="var docutils literal"><span class="pre">dest-dir</span></tt> without physically copying the file contents.
 
116
Both source and destination must lie inside the same S3QL file system.</p>
 
117
<p>The replication will not take any additional space. Only if one of
 
118
directories is modified later on, the modified data will take
 
119
additional storage space.</p>
 
120
<p><tt class=" docutils literal"><span class="pre">s3qlcp</span></tt> can only be called by the user that mounted the file system
 
121
and (if the file system was mounted with <tt class=" docutils literal"><span class="pre">--allow-other</span></tt> or <tt class=" docutils literal"><span class="pre">--allow-root</span></tt>)
 
122
the root user. This limitation might be removed in the future (see <a class="reference external" href="http://code.google.com/p/s3ql/issues/detail?id=155">issue 155</a>).</p>
 
123
<p>Note that:</p>
 
124
<ul class="simple">
 
125
<li>After the replication, both source and target directory will still
 
126
be completely ordinary directories. You can regard <tt class=" docutils literal"><span class="pre">&lt;src&gt;</span></tt> as a
 
127
snapshot of <tt class=" docutils literal"><span class="pre">&lt;target&gt;</span></tt> or vice versa. However, the most common
 
128
usage of <tt class=" docutils literal"><span class="pre">s3qlcp</span></tt> is to regularly duplicate the same source
 
129
directory, say <tt class=" docutils literal"><span class="pre">documents</span></tt>, to different target directories. For a
 
130
e.g. monthly replication, the target directories would typically be
 
131
named something like <tt class=" docutils literal"><span class="pre">documents_Januray</span></tt> for the replication in
 
132
January, <tt class=" docutils literal"><span class="pre">documents_February</span></tt> for the replication in February etc.
 
133
In this case it is clear that the target directories should be
 
134
regarded as snapshots of the source directory.</li>
 
135
<li>Exactly the same effect could be achieved by an ordinary copy
 
136
program like <tt class=" docutils literal"><span class="pre">cp</span> <span class="pre">-a</span></tt>. However, this procedure would be orders of
 
137
magnitude slower, because <tt class=" docutils literal"><span class="pre">cp</span></tt> would have to read every file
 
138
completely (so that S3QL had to fetch all the data over the network
 
139
from the backend) before writing them into the destination folder.</li>
 
140
<li>Before starting with the replication, S3QL has to flush the local
 
141
cache. So if you just copied lots of new data into the file system
 
142
that has not yet been uploaded, replication will take longer than
 
143
usual.</li>
 
144
</ul>
 
145
<div class="section" id="snapshotting-vs-hardlinking">
 
146
<h3>Snapshotting vs Hardlinking<a class="headerlink" href="#snapshotting-vs-hardlinking" title="Permalink to this headline">¶</a></h3>
 
147
<p>Snapshot support in S3QL is inspired by the hardlinking feature that
 
148
is offered by programs like <a class="reference external" href="http://www.samba.org/rsync">rsync</a> or
 
149
<a class="reference external" href="http://savannah.nongnu.org/projects/storebackup">storeBackup</a>.
 
150
These programs can create a hardlink instead of copying a file if an
 
151
identical file already exists in the backup. However, using hardlinks
 
152
has two large disadvantages:</p>
 
153
<ul class="simple">
 
154
<li>backups and restores always have to be made with a special program
 
155
that takes care of the hardlinking. The backup must not be touched
 
156
by any other programs (they may make changes that inadvertently
 
157
affect other hardlinked files)</li>
 
158
<li>special care needs to be taken to handle files which are already
 
159
hardlinked (the restore program needs to know that the hardlink was
 
160
not just introduced by the backup program to safe space)</li>
 
161
</ul>
 
162
<p>S3QL snapshots do not have these problems, and they can be used with
 
163
any backup program.</p>
 
164
</div>
 
165
</div>
 
166
<div class="section" id="options">
 
167
<h2>Options<a class="headerlink" href="#options" title="Permalink to this headline">¶</a></h2>
 
168
<p>The <strong class="command">s3qlcp</strong> command accepts the following options:</p>
 
169
<blockquote>
 
170
<div><table class="docutils option-list" frame="void" rules="none">
 
171
<col class="option" />
 
172
<col class="description" />
 
173
<tbody valign="top">
 
174
<tr><td class="option-group">
 
175
<kbd><span class="option">--debug</span></kbd></td>
 
176
<td>activate debugging output</td></tr>
 
177
<tr><td class="option-group">
 
178
<kbd><span class="option">--quiet</span></kbd></td>
 
179
<td>be really quiet</td></tr>
 
180
<tr><td class="option-group">
 
181
<kbd><span class="option">--version</span></kbd></td>
 
182
<td>just print program version and exit</td></tr>
 
183
</tbody>
 
184
</table>
 
185
</div></blockquote>
 
186
</div>
 
187
<div class="section" id="exit-status">
 
188
<h2>Exit Status<a class="headerlink" href="#exit-status" title="Permalink to this headline">¶</a></h2>
 
189
<p><strong class="command">s3qlcp</strong> returns exit code 0 if the operation succeeded and 1 if some
 
190
error occured.</p>
 
191
</div>
 
192
<div class="section" id="see-also">
 
193
<h2>See Also<a class="headerlink" href="#see-also" title="Permalink to this headline">¶</a></h2>
 
194
<p>The S3QL homepage is at <a class="reference external" href="http://code.google.com/p/s3ql/">http://code.google.com/p/s3ql/</a>.</p>
 
195
<p>The full S3QL documentation should also be installed somewhere on your
 
196
system, conventional locations are <tt class="file docutils literal"><span class="pre">/usr/share/doc/s3ql</span></tt> or
 
197
<tt class="file docutils literal"><span class="pre">/usr/local/doc/s3ql</span></tt>.</p>
 
198
</div>
 
199
</div>
 
200
 
 
201
 
 
202
          </div>
 
203
        </div>
 
204
      </div>
 
205
      <div class="clearer"></div>
 
206
    </div>
 
207
    <div class="related">
 
208
      <h3>Navigation</h3>
 
209
      <ul>
 
210
        <li class="right" style="margin-right: 10px">
 
211
          <a href="rm.html" title="The s3qlrm command"
 
212
             >next</a></li>
 
213
        <li class="right" >
 
214
          <a href="ctrl.html" title="The s3qlctrl command"
 
215
             >previous</a> |</li>
 
216
        <li><a href="../index.html">S3QL 1.0.1 documentation</a> &raquo;</li>
 
217
          <li><a href="index.html" >Manpages</a> &raquo;</li> 
 
218
      </ul>
 
219
    </div>
 
220
    <div class="footer">
 
221
        &copy; Copyright 2008-2011, Nikolaus Rath.
 
222
      Created using <a href="http://sphinx.pocoo.org/">Sphinx</a> 1.1pre.
 
223
    </div>
 
224
  </body>
 
225
</html>
 
 
b'\\ No newline at end of file'