|
1 | 1 | # The xbstream binary overview
|
2 | 2 |
|
3 |
| -To support simultaneous compression and streaming, a new custom streaming |
4 |
| -format called xbstream was introduced to Percona XtraBackup in addition to |
5 |
| -the TAR format. That was required to overcome some limitations of traditional |
6 |
| -archive formats such as tar, cpio and others which did not allow streaming |
7 |
| -dynamically generated files, for example dynamically compressed files. Other |
8 |
| -advantages of xbstream over traditional streaming/archive format include |
9 |
| -ability to stream multiple files concurrently (so it is possible to use |
| 3 | +To support simultaneous compression and streaming, the xbstream binary was added to Percona XtraBackup, along with the xbstream format and tar format. These additions were required to overcome some limitations of traditional |
| 4 | +archive formats such as tar, cpio, and others, which did not allow streaming |
| 5 | +dynamically generated files. |
| 6 | + |
| 7 | +Other advantages of xbstream over traditional streaming/archive format include streaming multiple files concurrently (so it is possible to use |
10 | 8 | streaming in the xbstream format together with the –parallel option) and more
|
11 | 9 | compact data storage.
|
12 | 10 |
|
13 |
| -This utility has a tar-like interface: |
14 |
| - |
15 |
| -* with the `-x` option it extracts files from the stream read from its |
16 |
| -standard input to the current directory unless specified otherwise with the |
17 |
| -`-c` option. The parallel extraction is supported with the `--parallel` |
18 |
| -option. |
19 |
| - |
20 |
| -* with the `-c` option it streams files specified on the command line to its |
21 |
| -standard output. |
22 |
| - |
23 |
| -* with the `--decrypt=ALGO` option specified xbstream will automatically |
24 |
| -decrypt encrypted files when extracting input stream. Supported values for |
25 |
| -this option are: `AES128`, `AES192`, and `AES256`. Either |
26 |
| -`--encrypt-key` or `--encrypt-key-file` options must be specified to |
27 |
| -provide encryption key, but not both. |
28 |
| - |
29 |
| -* with the `--encrypt-threads` option you can specify the number of threads |
30 |
| -for parallel data encryption. The default value is `1`. |
31 |
| - |
32 |
| -* the `--encrypt-key` option is used to specify the encryption key that will |
33 |
| -be used. It can’t be used with `--encrypt-key-file` option because they |
34 |
| -are mutually exclusive. |
35 |
| - |
36 |
| -* the `--encrypt-key-file` option is used to specify the file that contains |
37 |
| -the encryption key. It can’t be used with `--encrypt-key` option. |
38 |
| -because they are mutually exclusive. |
39 |
| - |
40 |
| -The utility also tries to minimize its impact on the OS page cache by using the |
41 |
| -appropriate `posix_fadvise()` calls when available. |
42 |
| - |
43 |
| -When compression is enabled with *xtrabackup* all data is being compressed, |
44 |
| -including the transaction log file and meta data files, using the specified |
45 |
| -compression algorithm. Percona XtraBackup supports the following compression algorithms: |
46 |
| - |
47 |
| -## Zstandard (ZSTD) |
48 |
| - |
49 |
| -The Zstandard (ZSTD) is a fast lossless compression algorithm that targets real-time compression scenarios and better compression ratios. `ZSTD` is the default compression algorithm for the `--compress` option. |
50 |
| - |
51 |
| -To compress files using the `ZSTD` compression algorithm, use the `--compress` option: |
52 |
| - |
53 |
| -```{.bash data-prompt="$"} |
54 |
| -$ xtrabackup --backup --compress --target-dir=/data/backup |
55 |
| -``` |
56 |
| - |
57 |
| -The resulting files have the `\*.zst` format. |
58 |
| - |
59 |
| -You can specify `ZSTD` compression level with the [`--compress-zstd-level(=#)`](xtrabackup-option-reference.md#compress-zstd-level) option. The default value is `1`. |
60 |
| - |
61 |
| -```{.bash data-prompt="$"} |
62 |
| -$ xtrabackup –backup –compress –compress-zstd-level=1 –target-dir=/data/backup |
63 |
| -``` |
64 |
| - |
65 |
| -## lz4 |
66 |
| - |
67 |
| -To compress files using the `lz4` compression algorithm, set the `--compress` option to `lz4`: |
68 |
| - |
69 |
| -```{.bash data-prompt="$"} |
70 |
| -$ xtrabackup --backup --compress=lz4 --target-dir=/data/backup |
71 |
| -``` |
72 |
| - |
73 |
| -The resulting files have the `\*.lz4` format. |
| 11 | +For details on the command-line options, see [xbcloud command-line options]. When available, the utility tries to minimize its impact on the OS page cache by using the appropriate `posix_fadvise()` calls. |
74 | 12 |
|
75 |
| -To decompress files, use the `--decompress` option. |
| 13 | +When compression is enabled with xtrabackup all data is compressed, |
| 14 | +including the transaction log file and metadata files, using the specified |
| 15 | +compression algorithm. Read more about supported compression algorithms in the [Create a compressed backup](create-compressed-backup.md) document. |
76 | 16 |
|
| 17 | +[xbcloud command-line options]: xbcloud-options.md |
0 commit comments