~akopytov/percona-xtrabackup/bug1166888-2.0

« back to all changes in this revision

Viewing changes to src/libarchive/doc/update.sh

  • Committer: Alexey Kopytov
  • Date: 2012-02-10 20:05:56 UTC
  • mto: This revision was merged to the branch mainline in revision 390.
  • Revision ID: akopytov@gmail.com-20120210200556-6kx41z8wwrqfucro
Rebase of the parallel compression patch on new trunk + post-review
fixes.

Implementation of parallel compression and streaming for XtraBackup.

This revision implements the following changes:

* InnoDB files are now streamed by the xtrabackup binary rather than
innobackupex. As a result, integrity is now verified by xtrabackup and
thus tar4ibd is no longer needed, so it was removed.

* xtrabackup binary now accepts the new '--stream' option which has
exactly the same semantics as the '--stream' option in
innobackupex: it tells xtrabackup to stream all files to the standard
output in the specified format rather than storing them locally.

* The xtrabackup binary can now do parallel compression using the
quicklz library. Two new options were added to xtrabackup to support
this feature:

- '--compress' tells xtrabackup to compress all output data, including
the transaction log file and meta data files, using the specified
compression algorithm. The only currently supported algorithm is
'quicklz'. The resulting files have the qpress archive format,
i.e. every *.qp file produced by xtrabackup is essentially a one-file
qpress archive and can be extracted and uncompressed by the qpress
file archiver (http://www.quicklz.com/).

- '--compress-threads' specifies the number of worker threads used by
xtrabackup for parallel data compression. This option defaults to 1.

Parallel compression ('--compress-threads') can be used together with
parallel file copying ('--parallel'). For example, '--parallel=4
--compress --compress-threads=2' will create 4 IO threads that will
read the data and pipe it to 2 compression threads.

* To support simultaneous compression and streaming, a new custom
streaming format called 'xbstream' was introduced to XtraBackup in
addition to the 'tar' format. That was required to overcome some
limitations of traditional archive formats such as 'tar', 'cpio' and
others that do not allow streaming dynamically generated files, for
example dynamically compressed files.  Other advantages of xbstream over
traditional streaming/archive formats include ability to stream multiple
files concurrently (so it is possible to use streaming in the xbstream
format together with the --parallel option) and more compact data
storage.

* To allow streaming and extracting files to/from the xbstream format
produced by xtrabackup, a new utility aptly called 'xbstream' was
added to the XtraBackup distribution. This utility has a tar-like
interface:

- with the '-x' option it extracts files from the stream read from its
standard input to the current directory unless specified otherwise
with the '-C' option.

- with the '-c' option it streams files specified on the command line
to its standard output.

The utility also tries to minimize its impact on the OS page cache by
using the appropriate posix_fadvise() calls when available.

Show diffs side-by-side

added added

removed removed

Lines of Context:
 
1
#!/bin/sh
 
2
 
 
3
#
 
4
# Simple script to repopulate the 'doc' tree from
 
5
# the mdoc man pages stored in each project.
 
6
#
 
7
 
 
8
# Collect list of man pages, relative to my subdirs
 
9
cd man
 
10
MANPAGES=`for d in libarchive tar cpio;do ls ../../$d/*.[135];done | grep -v '\.so\.'`
 
11
cd ..
 
12
 
 
13
# Build Makefile in 'man' directory
 
14
cd man
 
15
rm -f *.[135]
 
16
echo > Makefile
 
17
echo "default: all" >>Makefile
 
18
echo >>Makefile
 
19
all="all:"
 
20
for f in $MANPAGES; do
 
21
    outname="`basename $f`"
 
22
    echo >> Makefile
 
23
    echo $outname: ../mdoc2man.awk $f >> Makefile
 
24
    echo "      awk -f ../mdoc2man.awk < $f > $outname" >> Makefile
 
25
    all="$all $outname"
 
26
done
 
27
echo $all >>Makefile
 
28
cd ..
 
29
 
 
30
# Rebuild Makefile in 'text' directory
 
31
cd text
 
32
rm -f *.txt
 
33
echo > Makefile
 
34
echo "default: all" >>Makefile
 
35
echo >>Makefile
 
36
all="all:"
 
37
for f in $MANPAGES; do
 
38
    outname="`basename $f`.txt"
 
39
    echo >> Makefile
 
40
    echo $outname: $f >> Makefile
 
41
    echo "      nroff -mdoc $f | col -b > $outname" >> Makefile
 
42
    all="$all $outname"
 
43
done
 
44
echo $all >>Makefile
 
45
cd ..
 
46
 
 
47
# Rebuild Makefile in 'pdf' directory
 
48
cd pdf
 
49
rm -f *.pdf
 
50
echo > Makefile
 
51
echo "default: all" >>Makefile
 
52
echo >>Makefile
 
53
all="all:"
 
54
for f in $MANPAGES; do
 
55
    outname="`basename $f`.pdf"
 
56
    echo >> Makefile
 
57
    echo $outname: $f >> Makefile
 
58
    echo "      groff -mdoc -T ps $f | ps2pdf - - > $outname" >> Makefile
 
59
    all="$all $outname"
 
60
done
 
61
echo $all >>Makefile
 
62
cd ..
 
63
 
 
64
# Build Makefile in 'html' directory
 
65
cd html
 
66
rm -f *.html
 
67
echo > Makefile
 
68
echo "default: all" >>Makefile
 
69
echo >>Makefile
 
70
all="all:"
 
71
for f in $MANPAGES; do
 
72
    outname="`basename $f`.html"
 
73
    echo >> Makefile
 
74
    echo $outname: $f >> Makefile
 
75
    echo "      groff -mdoc2html $f > $outname" >> Makefile
 
76
    all="$all $outname"
 
77
done
 
78
echo $all >>Makefile
 
79
cd ..
 
80
 
 
81
# Build Makefile in 'wiki' directory
 
82
cd wiki
 
83
rm -f *.wiki
 
84
echo > Makefile
 
85
echo "default: all" >>Makefile
 
86
echo >>Makefile
 
87
all="all:"
 
88
for f in $MANPAGES; do
 
89
    outname="`basename $f | awk '{ac=split($0,a,"[_.-]");o="ManPage";for(w=0;w<=ac;++w){o=o toupper(substr(a[w],1,1)) substr(a[w],2)};print o}'`.wiki"
 
90
    echo >> Makefile
 
91
    echo $outname: ../mdoc2wiki.awk $f >> Makefile
 
92
    echo "      awk -f ../mdoc2wiki.awk < $f > $outname" >> Makefile
 
93
    all="$all $outname"
 
94
done
 
95
echo $all >>Makefile
 
96
cd ..
 
97
 
 
98
# Convert all of the manpages to -man format
 
99
(cd man && make)
 
100
# Format all of the manpages to text
 
101
(cd text && make)
 
102
# Format all of the manpages to PDF
 
103
(cd pdf && make)
 
104
# Format all of the manpages to HTML
 
105
(cd html && make)
 
106
# Format all of the manpages to Google Wiki syntax
 
107
(cd wiki && make)