3
<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN"
4
"http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
7
<html xmlns="http://www.w3.org/1999/xhtml">
9
<meta http-equiv="Content-Type" content="text/html; charset=utf-8" />
11
<title>The s3qlcp command — S3QL 1.0.1 documentation</title>
13
<link rel="stylesheet" href="../_static/sphinxdoc.css" type="text/css" />
14
<link rel="stylesheet" href="../_static/pygments.css" type="text/css" />
16
<script type="text/javascript">
17
var DOCUMENTATION_OPTIONS = {
20
COLLAPSE_INDEX: false,
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" />
38
<li class="right" style="margin-right: 10px">
39
<a href="rm.html" title="The s3qlrm command"
40
accesskey="N">next</a></li>
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> »</li>
45
<li><a href="index.html" accesskey="U">Manpages</a> »</li>
48
<div class="sphinxsidebar">
49
<div class="sphinxsidebarwrapper">
50
<h3><a href="../index.html">Table Of Contents</a></h3>
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 & 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>
79
<li class="toctree-l1"><a class="reference internal" href="../resources.html">Further Resources / Getting Help</a></li>
83
<div id="searchbox" style="display: none">
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" />
91
<p class="searchtip" style="font-size: 90%">
95
<script type="text/javascript">$('#searchbox').show(0);</script>
99
<div class="document">
100
<div class="documentwrapper">
101
<div class="bodywrapper">
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"><source-dir></span><span class="l"> </span><span class="nv"><dest-dir></span><span class="l"></span>
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>
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"><src></span></tt> as a
127
snapshot of <tt class=" docutils literal"><span class="pre"><target></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
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>
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>
162
<p>S3QL snapshots do not have these problems, and they can be used with
163
any backup program.</p>
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>
170
<div><table class="docutils option-list" frame="void" rules="none">
171
<col class="option" />
172
<col class="description" />
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>
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
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>
205
<div class="clearer"></div>
207
<div class="related">
210
<li class="right" style="margin-right: 10px">
211
<a href="rm.html" title="The s3qlrm command"
214
<a href="ctrl.html" title="The s3qlctrl command"
216
<li><a href="../index.html">S3QL 1.0.1 documentation</a> »</li>
217
<li><a href="index.html" >Manpages</a> »</li>
221
© Copyright 2008-2011, Nikolaus Rath.
222
Created using <a href="http://sphinx.pocoo.org/">Sphinx</a> 1.1pre.
b'\\ No newline at end of file'