Commit 02c1ea5f authored by bescoto's avatar bescoto

Applied Chris Pepper's "FAQ cleanup patch"


git-svn-id: http://svn.savannah.nongnu.org/svn/rdiff-backup@607 2b77aa54-bcbc-44c9-a7ec-4f6cf2b41109
parent 6d6a48ad
<!-- #bbpragma doctype="-//W3C//DTD XHTML 1.0 Strict//EN" root_element="body" -->
<h3>Table of contents</h3> <h3>Table of contents</h3>
<ol><li><a href="#__future__">When I try to run rdiff-backup it says <ol><li><a href="#__future__">When I try to run rdiff-backup it says
...@@ -10,7 +12,7 @@ syntax". What's happening?</a></li> ...@@ -10,7 +12,7 @@ syntax". What's happening?</a></li>
<li><a href="#OSX">Does rdiff-backup run under Mac OS X?</a></li> <li><a href="#OSX">Does rdiff-backup run under Mac OS X?</a></li>
<li><a href="#remove_dir">My backup set contains some files that I just realized I don't want/need backed up. How do I remove them from the backup volume to save space?</li> <li><a href="#remove_dir">My backup set contains some files that I just realized I don't want/need backed up. How do I remove them from the backup volume to save space?</a></li>
<li><a href="#solaris">Does rdiff-backup work under Solaris?</a></li> <li><a href="#solaris">Does rdiff-backup work under Solaris?</a></li>
...@@ -39,33 +41,30 @@ destination" and then fails again. What should I do?</a></li> ...@@ -39,33 +41,30 @@ destination" and then fails again. What should I do?</a></li>
<ol> <ol>
<a name="__future__"> <li><strong><a name="__future__">When I try to run rdiff-backup it says "ImportError: No
<li><strong>When I try to run rdiff-backup it says "ImportError: No
module named __future__" or "SyntaxError: invalid syntax". What's module named __future__" or "SyntaxError: invalid syntax". What's
happening?</strong> happening?</a></strong>
<P>rdiff-backup versions 0.2.x require Python version 2.1 or later, <p>rdiff-backup versions 0.2.x require Python version 2.1 or later,
and versions 0.3.x and later require Python version 2.2 or later. If and versions 0.3.x and later require Python version 2.2 or later. If
you don't know what version of python you are running, type in "python you don't know what version of python you are running, type in "python
-V" from the shell. I'm sorry if this is inconvenient, but -V" from the shell. I'm sorry if this is inconvenient, but
rdiff-backup uses generators, iterators, nested scoping, and rdiff-backup uses generators, iterators, nested scoping, and
static/class methods extensively, and these were only added in version static/class methods extensively, and these were only added in version
2.2. 2.2.</p>
<P>If you have two versions of python installed, and running "python" <p>If you have two versions of python installed, and running "python"
defaults to an early version, you'll probably have to change the first defaults to an early version, you'll probably have to change the first
line of the rdiff-backup script. For instance, you could set it to: line of the rdiff-backup script. For instance, you could set it to:</p>
<pre>#!/usr/bin/env python2.2</pre> <pre>#!/usr/bin/env python2.2</pre>
</li> </li>
<a name="verbosity"> <li><strong><a name="verbosity">What do the different verbosity levels mean?</a></strong>
<li><strong>What do the different verbosity levels mean?</strong>
<P>There is no formal specification, but here is a rough description <p>There is no formal specification, but here is a rough description
(settings are always cumulative, so 5 displays everything 4 does): (settings are always cumulative, so 5 displays everything 4 does):</p>
<P>
<table cellspacing="10"> <table cellspacing="10">
<tr><td>0</td><td>No information given</td></tr> <tr><td>0</td><td>No information given</td></tr>
<tr><td>1</td><td>Fatal Errors displayed</td></tr> <tr><td>1</td><td>Fatal Errors displayed</td></tr>
...@@ -78,15 +77,14 @@ line of the rdiff-backup script. For instance, you could set it to: ...@@ -78,15 +77,14 @@ line of the rdiff-backup script. For instance, you could set it to:
<tr><td>8</td><td>All logging is dated</td></tr> <tr><td>8</td><td>All logging is dated</td></tr>
<tr><td>9</td><td>Details on which objects are moving across the connection</td></tr> <tr><td>9</td><td>Details on which objects are moving across the connection</td></tr>
</table> </table>
</li>
<a name="windows"> <li><strong><a name="windows">Does rdiff-backup run under Windows?</a></strong>
<li><strong>Does rdiff-backup run under Windows?</strong>
<P>Yes, apparently it is possible. First, follow Jason Piterak's <p>Yes, apparently it is possible. First, follow Jason Piterak's
instructions: instructions:</p>
<pre> <pre>Subject: Cygwin rdiff-backup
Subject: Cygwin rdiff-backup
From: Jason Piterak &lt;Jason_Piterak@c-i-s.com&gt; From: Jason Piterak &lt;Jason_Piterak@c-i-s.com&gt;
Date: Mon, 4 Feb 2002 16:54:24 -0500 (13:54 PST) Date: Mon, 4 Feb 2002 16:54:24 -0500 (13:54 PST)
To: rdiff-backup@keywest.Stanford.EDU To: rdiff-backup@keywest.Stanford.EDU
...@@ -121,22 +119,22 @@ some header files in the Makefile: ...@@ -121,22 +119,22 @@ some header files in the Makefile:
</pre> </pre>
XXX The above information is old, point to newer porting efforts? <p>XXX The above information is old, point to newer porting efforts?</p>
Although some windows filesystems lack features like fifos, case <p>Although some Windows filesystems lack features like FIFOs, case
sensitive filenames, or files with colons (":") in them, this should sensitive filenames, or files with colons (":") in them, this should
be autodetected and compensated for by rdiff-backup. be autodetected and compensated for by rdiff-backup.</p>
</li>
<P> <li><strong><a name="OSX">Does rdiff-backup run under Mac OS X?</a></strong>
<a name="OSX">
<li><strong>Does rdiff-backup run under Mac OS X?</strong>
<p> <p>Yes, but there may be some issues installing librsync. The easiest
Yes, but there may be some issues installing librsync. See this option is probably to use Fink <a
message from Gerd Knops: href="http://fink.sourceforge.net/">http://fink.sourceforge.net/</a>,
which can install rdiff-backup automatically for you. If you want to
build rdiff-backup yourself, see this message from Gerd Knops:</p>
<pre> <pre>From: Gerd Knops &lt;gerti@bitart.com&gt;
From: Gerd Knops <gerti@bitart.com>
Date: Thu, 3 Oct 2002 03:56:47 -0500 (01:56 PDT) Date: Thu, 3 Oct 2002 03:56:47 -0500 (01:56 PDT)
[parts of original message deleted] [parts of original message deleted]
...@@ -148,46 +146,43 @@ these instructions build it fine with all tests running OK ...@@ -148,46 +146,43 @@ these instructions build it fine with all tests running OK
automake --foreign --add-missing automake --foreign --add-missing
env CFLAGS=-no-cpp-precomp ./configure env CFLAGS=-no-cpp-precomp ./configure
make make
make install make install</pre>
</pre>
Also, if you are backing up to a file system that is not case <p>Also, if you are backing up to a file system that is not case
sensitive you may need to use "--chars-to-quote A-Z". If you do use sensitive you may need to use "--chars-to-quote A-Z". If you do use
--chars-to-quote, remember to use it with the same arguments when --chars-to-quote, remember to use it with the same arguments when
restoring or listing incrementes. restoring or listing increments.</p>
</li> </li>
<P> <li><strong><a name="remove_dir">My backup set contains some files that I just realized I
<a name="remove_dir">
<li><strong>My backup set contains some files that I just realized I
don't want/need backed up. How do I remove them from the backup don't want/need backed up. How do I remove them from the backup
volume to save space?</strong> volume to save space?</a></strong>
<p>Let's take an example. Suppose you ran:</p>
<P>Let's take an example. Suppose you ran
<pre>rdiff-backup /usr /backup</pre> <pre>rdiff-backup /usr /backup</pre>
and now realize that you don't want /usr/local backed up on /backup.
Next time you back up, you run <p>and now realize that you don't want /usr/local backed up on /backup.
Next time you back up, you run:</p>
<pre>rdiff-backup --exclude /usr/local /usr /backup</pre> <pre>rdiff-backup --exclude /usr/local /usr /backup</pre>
so that /usr/local is no longer copied to /backup/usr/local. so that /usr/local is no longer copied to /backup/usr/local.
However, old information about /usr/local is still present in <p>However, old information about /usr/local is still present in
/backup/rdiff-backup-data/increments/usr/local. You can try to /backup/rdiff-backup-data/increments/usr/local. You can try to
manually remove this old information, but it's safer to let it be manually remove this old information, but it's safer to let it be
removed by rdiff-backup when you run it with the --remove-older-than removed by rdiff-backup when you run it with the --remove-older-than
option. option.</p>
</li> </li>
<P> <li><strong><a name="solaris">Does rdiff-backup work under Solaris?</a></strong>
<a name="solaris">
<li><strong>Does rdiff-backup work under Solaris?</strong>
<P>There may be a problem with rdiff-backup and Solaris' libthread. <p>There may be a problem with rdiff-backup and Solaris' libthread.
Adding "ulimit -n unlimited" may fix the problem though. Here is a Adding "ulimit -n unlimited" may fix the problem though. Here is a
post by Kevin Spicer on the subject: post by Kevin Spicer on the subject:</p>
<pre> <pre>Subject: RE: Crash report....still not^H^H^H working
Subject: RE: Crash report....still not^H^H^H working From: "Spicer, Kevin" &lt;kevin.spicer@bmrb.co.uk&gt;
From: "Spicer, Kevin" <Kevin.Spicer@bmrb.co.uk>
Date: Sat, 11 May 2002 23:36:42 +0100 Date: Sat, 11 May 2002 23:36:42 +0100
To: rdiff-backup@keywest.Stanford.EDU To: rdiff-backup@keywest.Stanford.EDU
...@@ -214,12 +209,10 @@ at least I think I've now got round it). ...@@ -214,12 +209,10 @@ at least I think I've now got round it).
</pre> </pre>
</li> </li>
<P> <li><strong><a name="speed">How fast is rdiff-backup? Can it be run on large
<a name="speed"> data sets?</a></strong>
<li><strong>How fast is rdiff-backup? Can it be run on large
data sets?</strong>
<P>rdiff-backup can be limited by the CPU, disk IO, or available <p>rdiff-backup can be limited by the CPU, disk IO, or available
bandwidth, and the length of a session can be affected by the amount bandwidth, and the length of a session can be affected by the amount
of data, how much the data changed, and how many files are present. of data, how much the data changed, and how many files are present.
That said, in the typical case the number/size of changed files is That said, in the typical case the number/size of changed files is
...@@ -227,23 +220,20 @@ relatively small compared to that of unchanged files, and rdiff-backup ...@@ -227,23 +220,20 @@ relatively small compared to that of unchanged files, and rdiff-backup
is often either CPU or bandwidth bound, and takes time proportional to is often either CPU or bandwidth bound, and takes time proportional to
the total number of files. Initial mirrorings will usually be the total number of files. Initial mirrorings will usually be
bandwidth or disk bound, and will take much longer than subsequent bandwidth or disk bound, and will take much longer than subsequent
updates. updates.</p>
<P>To give one arbitrary data point, when I back up my personal HD <p>To give one arbitrary data point, when I back up my personal HD
locally (about 36GB, 530000 files, maybe 500 MB turnover, athlon 2000, locally (about 36GB, 530000 files, maybe 500 MB turnover, Athlon 2000,
7200 IDE disks, version 0.12.2) rdiff-backup takes about 15 minutes 7200 IDE disks, version 0.12.2) rdiff-backup takes about 15 minutes
and is usually CPU bound. and is usually CPU bound.</p>
</li> </li>
<p> <li><strong><a name="statistics">What do the various fields mean in the
<a name="statistics"> session statistics and directory statistics files?</a></strong>
<li><strong>What do the various fields mean in the
session statistics and directory statistics files?</strong>
<P>Let's examine an example session statistics file: <p>Let's examine an example session statistics file:</p>
<pre> <pre>StartTime 1028200920.44 (Thu Aug 1 04:22:00 2002)
StartTime 1028200920.44 (Thu Aug 1 04:22:00 2002)
EndTime 1028203082.77 (Thu Aug 1 04:58:02 2002) EndTime 1028203082.77 (Thu Aug 1 04:58:02 2002)
ElapsedTime 2162.33 (36 minutes 2.33 seconds) ElapsedTime 2162.33 (36 minutes 2.33 seconds)
SourceFiles 494619 SourceFiles 494619
...@@ -260,59 +250,56 @@ ChangedMirrorSize 85228149 (81.3 MB) ...@@ -260,59 +250,56 @@ ChangedMirrorSize 85228149 (81.3 MB)
IncrementFiles 1857 IncrementFiles 1857
IncrementFileSize 13799799 (13.2 MB) IncrementFileSize 13799799 (13.2 MB)
TotalDestinationSizeChange 28034365 (26.7 MB) TotalDestinationSizeChange 28034365 (26.7 MB)
Errors 0 Errors 0</pre>
</pre>
<P>StartTime and EndTime are measured in seconds since the epoch. <p>StartTime and EndTime are measured in seconds since the epoch.
ElapsedTime is just EndTime - StartTime, the length of the ElapsedTime is just EndTime - StartTime, the length of the
rdiff-backup session. rdiff-backup session.</p>
<P>SourceFiles are the number of files found in the source directory, <p>SourceFiles are the number of files found in the source directory,
and SourceFileSize is the total size of those files. MirrorFiles are and SourceFileSize is the total size of those files. MirrorFiles are
the number of files found in the mirror directory (not including the the number of files found in the mirror directory (not including the
rdiff-backup-data directory) and MirrorFileSize is the total size of rdiff-backup-data directory) and MirrorFileSize is the total size of
those files. All sizes are in bytes. If the source directory hasn't those files. All sizes are in bytes. If the source directory hasn't
changed since the last backup, MirrorFiles == SourceFiles and changed since the last backup, MirrorFiles == SourceFiles and
SourceFileSize == MirrorFileSize. SourceFileSize == MirrorFileSize.</p>
<P>NewFiles and NewFileSize are the total number and size of the files <p>NewFiles and NewFileSize are the total number and size of the files
found in the source directory but not in the mirror directory. They found in the source directory but not in the mirror directory. They
are new as of the last backup. are new as of the last backup.</p>
<P>DeletedFiles and DeletedFileSize are the total number and size of <p>DeletedFiles and DeletedFileSize are the total number and size of
the files found in the mirror directory but not the source directory. the files found in the mirror directory but not the source directory.
They have been deleted since the last backup. They have been deleted since the last backup.</p>
<P>ChangedFiles are the number of files that exist both on the mirror <p>ChangedFiles are the number of files that exist both on the mirror
and on the source directories and have changed since the previous and on the source directories and have changed since the previous
backup. ChangedSourceSize is their total size on the source backup. ChangedSourceSize is their total size on the source
directory, and ChangedMirrorSize is their total size on the mirror directory, and ChangedMirrorSize is their total size on the mirror
directory. directory.</p>
<P>IncrementFiles is the number of increment files written to the <p>IncrementFiles is the number of increment files written to the
rdiff-backup-data directory, and IncrementFileSize is their total rdiff-backup-data directory, and IncrementFileSize is their total
size. Generally one increment file will be written for every new, size. Generally one increment file will be written for every new,
deleted, and changed file. deleted, and changed file.</p>
<P>TotalDestinationSizeChange is the number of bytes the destination <p>TotalDestinationSizeChange is the number of bytes the destination
directory as a whole (mirror portion and rdiff-backup-data directory) directory as a whole (mirror portion and rdiff-backup-data directory)
has grown during the given rdiff-backup session. This is usually has grown during the given rdiff-backup session. This is usually
close to IncrementFileSize + NewFileSize - DeletedFileSize + close to IncrementFileSize + NewFileSize - DeletedFileSize +
ChangedSourceSize - ChangedMirrorSize, but it also includes the space ChangedSourceSize - ChangedMirrorSize, but it also includes the space
taken up by the hardlink_data file to record hard links. taken up by the hardlink_data file to record hard links.</p>
</li> </li>
<a name="bwlimit"> <li><strong><a name="bwlimit">Is there some way to limit rdiff-backup's
<li><strong>Is there some way to limit rdiff-backup's bandwidth usage, as in rsync's --bwlimit option?</a></strong>
bandwidth usage, as in rsync's --bwlimit option?</strong>
<P>There is no internal rdiff-backup option to do this. However, the <p>There is no internal rdiff-backup option to do this. However, the
--sleep-ratio option can limit overall resource usage, including --sleep-ratio option can limit overall resource usage, including
bandwidth. Also, external utilities such as <a href="http://www.cons.org/cracauer/cstream.html">cstream</a> can be bandwidth. Also, external utilities such as <a href="http://www.cons.org/cracauer/cstream.html">cstream</a> can be
used to monitor bandwidth explicitly. trevor@tecnopolis.ca writes: used to monitor bandwidth explicitly. trevor@tecnopolis.ca writes:</p>
<pre> <pre>rdiff-backup --remote-schema
rdiff-backup --remote-schema
'cstream -v 1 -t 10000 | ssh %s '\''rdiff-backup --server'\'' | cstream -t 20000' 'cstream -v 1 -t 10000 | ssh %s '\''rdiff-backup --server'\'' | cstream -t 20000'
'netbak@foo.bar.com::/mnt/backup' localbakdir 'netbak@foo.bar.com::/mnt/backup' localbakdir
...@@ -324,11 +311,10 @@ this though as really you just want to limit it in one direction. ...@@ -324,11 +311,10 @@ this though as really you just want to limit it in one direction.
Also, note how I only -v 1 in one direction. You probably don't want Also, note how I only -v 1 in one direction. You probably don't want
to output stats for both directions as it will confuse whatever script to output stats for both directions as it will confuse whatever script
you have parsing the output. I guess it wouldn't hurt for manual runs you have parsing the output. I guess it wouldn't hurt for manual runs
however. however.</pre>
</pre>
To only limit bandwidth in one directory, simply remove one of the <p>To only limit bandwidth in one directory, simply remove one of the
cstream commands. Two cstream caveats may be worth mentioning: cstream commands. Two cstream caveats may be worth mentioning:</p>
<ol> <li>Because cstream is limiting the uncompressed data heading <ol> <li>Because cstream is limiting the uncompressed data heading
into or out of ssh, if ssh compression is turned on, cstream may be into or out of ssh, if ssh compression is turned on, cstream may be
...@@ -338,79 +324,71 @@ overly restrictive.</li> ...@@ -338,79 +324,71 @@ overly restrictive.</li>
rdiff-backup to exceed it for significant periods.</li> rdiff-backup to exceed it for significant periods.</li>
</ol> </ol>
<p> <p>Another option is to limit bandwidth at a lower (and perhaps more
Another option is to limit bandwidth at a lower (and perhaps more
appropriate) level. Adam Lazur mentions <a appropriate) level. Adam Lazur mentions <a
href="http://lartc.org/wondershaper/">The Wonder Shaper</a>.</p> href="http://lartc.org/wondershaper/">The Wonder Shaper</a>.</p>
</li> </li>
<a name="leak"> <li><strong><a name="leak">How much memory should rdiff-backup use? Is there a
<li><strong>How much memory should rdiff-backup use? Is there a memory leak?</a></strong>
memory leak?</strong>
<p>The amount of memory rdiff-backup uses should not depend much on <p>The amount of memory rdiff-backup uses should not depend much on
the size of directories being processed. Keeping track of hard links the size of directories being processed. Keeping track of hard links
may use up memory, so if you have, say, hundreds of thousands of files may use up memory, so if you have, say, hundreds of thousands of files
hard linked together, rdiff-backup may need tens of MB. hard linked together, rdiff-backup may need tens of MB.</p>
<p>If rdiff-backup seems to be leaking memory, it is probably because <p>If rdiff-backup seems to be leaking memory, it is probably because
it is using an early version of librsync. <strong>librsync 0.9.5 it is using an early version of librsync. <strong>librsync 0.9.5
leaks lots of memory.</strong> Version 0.9.5.1 should not leak and is leaks lots of memory.</strong> Version 0.9.5.1 should not leak and is
available from the rdiff-backup homepage. available from the rdiff-backup homepage.</p>
</li> </li>
<a name="dir_not_empty"> <li><strong><a name="dir_not_empty">I use NFS and keep getting some error that includes "OSError: [Errno 39] Directory not empty"</a></strong>
<li><strong>I use NFS and keep getting some error that includes "OSError: [Errno 39] Directory not empty"</strong>
<P>Several users have reported seeing errors that contain lines like <p>Several users have reported seeing errors that contain lines like
this: this:</p>
<pre> <pre>File "/usr/lib/python2.2/site-packages/rdiff_backup/rpath.py",
File "/usr/lib/python2.2/site-packages/rdiff_backup/rpath.py",
line 661, in rmdir line 661, in rmdir
OSError: [Errno 39] Directory not empty: OSError: [Errno 39] Directory not empty:
'/nfs/backup/redfish/win/Program Files/Common Files/GMT/Banners/11132' '/nfs/backup/redfish/win/Program Files/Common Files/GMT/Banners/11132'
Exception exceptions.TypeError: "'NoneType' object is not callable" Exception exceptions.TypeError: "'NoneType' object is not callable"
in &lt;bound method GzipFile.__del__ of in &lt;bound method GzipFile.__del__ of</pre>
</pre>
<p> All of these users were backing up onto NFS (Network File System). <p>All of these users were backing up onto NFS (Network File System).
I think this is probably a bug in NFS, although tell me if you know I think this is probably a bug in NFS, although tell me if you know
how to make rdiff-backup more NFS-friendly. To avoid this problem, how to make rdiff-backup more NFS-friendly. To avoid this problem,
run rdiff-backup locally on both ends instead of over NFS. This run rdiff-backup locally on both ends instead of over NFS. This
should be faster anyway. should be faster anyway.</p>
</li> </li>
<a name="regress_failure"> <li><strong><a name="regress_failure">For some reason rdiff-backup failed
<li><strong>For some reason rdiff-backup failed
while backing up. Now every time it runs it says "regressing while backing up. Now every time it runs it says "regressing
destination" and then fails again. What should I do?</strong> destination" and then fails again. What should I do?</a></strong>
<P>Firstly, this shouldn't happen. If it does, it indicates a <p>Firstly, this shouldn't happen. If it does, it indicates a
corrupted destination directory, a bug in rdiff-backup, or some other corrupted destination directory, a bug in rdiff-backup, or some other
serious recurring problem.</p> serious recurring problem.</p>
<p>However, here is a workaround that you might want to use, even <p>However, here is a workaround that you might want to use, even
though it probably won't solve the underlying problem: In the though it probably won't solve the underlying problem: In the
destination's rdiff-backup-data directory, there should be two destination's rdiff-backup-data directory, there should be two
"current_mirror" files, for instance "current_mirror" files, for instance:</p>
<pre>current_mirror.2003-09-07T16:43:00-07:00.data <pre>current_mirror.2003-09-07T16:43:00-07:00.data
current_mirror.2003-09-08T04:22:01-07:00.data</pre> current_mirror.2003-09-08T04:22:01-07:00.data</pre>
Delete the one with the earlier date. Also move the mirror_metadata <p>Delete the one with the earlier date. Also move the mirror_metadata
file with the later date out of the way, because it probably didn't file with the later date out of the way, because it probably didn't
get written correctly because that session was aborted: get written correctly because that session was aborted:</p>
<pre>mv mirror_metadata.2003-09-08T04:22:01-07:00.snapshot.gz \ <pre>mv mirror_metadata.2003-09-08T04:22:01-07:00.snapshot.gz \
aborted-metadata.2003-09-08T04:22:01-07:00.snapshot.gz</pre> aborted-metadata.2003-09-08T04:22:01-07:00.snapshot.gz</pre>
The next time rdiff-backup runs it won't try regressing the <p>The next time rdiff-backup runs it won't try regressing the
destination. Metadata will be read from the file system, which may destination. Metadata will be read from the file system, which may
result in some extra files being backed up, but there shouldn't be any result in some extra files being backed up, but there shouldn't be any
data loss.</p> data loss.</p>
</li> </li>
</ol> </ol>
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment