/usr/share/doc/bup/bup-damage.html is in bup-doc 0.29-3.
This file is owned by root:root, with mode 0o644.
The actual contents of the file can be viewed below.
1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 32 33 34 35 36 37 38 39 40 41 42 43 44 45 46 47 48 49 50 51 52 53 54 55 56 57 58 59 60 61 | <!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
<html xmlns="http://www.w3.org/1999/xhtml">
<head>
<meta http-equiv="Content-Type" content="text/html; charset=utf-8" />
<meta http-equiv="Content-Style-Type" content="text/css" />
<meta name="generator" content="pandoc" />
<meta name="author" content="Avery Pennarun apenwarr@gmail.com" />
<meta name="date" content="2017-04-01" />
<title>bup-damage(1) Bup debian/0.29-3</title>
<style type="text/css">code{white-space: pre;}</style>
</head>
<body>
<div id="header">
<h1 class="title">bup-damage(1) Bup debian/0.29-3</h1>
<h2 class="author">Avery Pennarun <a href="mailto:apenwarr@gmail.com">apenwarr@gmail.com</a></h2>
<h3 class="date">2017-04-01</h3>
</div>
<h1 id="name">NAME</h1>
<p>bup-damage - randomly destroy blocks of a file</p>
<h1 id="synopsis">SYNOPSIS</h1>
<p>bup damage [-n count] [-s maxsize] [--percent pct] [-S seed] [--equal] <filenames...></p>
<h1 id="description">DESCRIPTION</h1>
<p>Use <code>bup damage</code> to deliberately destroy blocks in a <code>.pack</code> or <code>.idx</code> file (from <code>.bup/objects/pack</code>) to test the recovery features of <code>bup-fsck</code>(1) or other programs.</p>
<p><em>THIS PROGRAM IS EXTREMELY DANGEROUS AND WILL DESTROY YOUR DATA</em></p>
<p><code>bup damage</code> is primarily useful for automated or manual tests of data recovery tools, to reassure yourself that the tools actually work.</p>
<h1 id="options">OPTIONS</h1>
<dl>
<dt>-n, --num=<em>numblocks</em></dt>
<dd>the number of separate blocks to damage in each file (default 10). Note that it's possible for more than one damaged segment to fall in the same <code>bup-fsck</code>(1) recovery block, so you might not damage as many recovery blocks as you expect. If this is a problem, use <code>--equal</code>.
</dd>
<dt>-s, --size=<em>maxblocksize</em></dt>
<dd>the maximum size, in bytes, of each damaged block (default 1 unless <code>--percent</code> is specified). Note that because of the way <code>bup-fsck</code>(1) works, a multi-byte block could fall on the boundary between two recovery blocks, and thus damaging two separate recovery blocks. In small files, it's also possible for a damaged block to be larger than a recovery block. If these issues might be a problem, you should use the default damage size of one byte.
</dd>
<dt>--percent=<em>maxblockpercent</em></dt>
<dd>the maximum size, in percent of the original file, of each damaged block. If both <code>--size</code> and <code>--percent</code> are given, the maximum block size is the minimum of the two restrictions. You can use this to ensure that a given block will never damage more than one or two <code>git-fsck</code>(1) recovery blocks.
</dd>
<dt>-S, --seed=<em>randomseed</em></dt>
<dd>seed the random number generator with the given value. If you use this option, your tests will be repeatable, since the damaged block offsets, sizes, and contents will be the same every time. By default, the random numbers are different every time (so you can run tests in a loop and repeatedly test with different damage each time).
</dd>
<dt>--equal</dt>
<dd>instead of choosing random offsets for each damaged block, space the blocks equally throughout the file, starting at offset 0. If you also choose a correct maximum block size, this can guarantee that any given damage block never damages more than one <code>git-fsck</code>(1) recovery block. (This is also guaranteed if you use <code>-s 1</code>.)
</dd>
</dl>
<h1 id="examples">EXAMPLES</h1>
<pre><code># make a backup in case things go horribly wrong
cp -pPR ~/.bup/objects/pack ~/bup-packs.bak
# generate recovery blocks for all packs
bup fsck -g
# deliberately damage the packs
bup damage -n 10 -s 1 -S 0 ~/.bup/objects/pack/*.{pack,idx}
# recover from the damage
bup fsck -r</code></pre>
<h1 id="see-also">SEE ALSO</h1>
<p><code>bup-fsck</code>(1), <code>par2</code>(1)</p>
<h1 id="bup">BUP</h1>
<p>Part of the <code>bup</code>(1) suite.</p>
</body>
</html>
|