From 8a548ee43b687b7c6d400914f17ff0163172d613 Mon Sep 17 00:00:00 2001 From: Patrick Birch <48594400+patrickbirch@users.noreply.github.com> Date: Tue, 30 Apr 2024 09:43:35 -0500 Subject: [PATCH] PXB-3232 Encrypted backup with xbstream larger than unencrypted backup On branch pxb-3232 modified: docs/create-compressed-backup.md modified: docs/take-streaming-backup.md --- docs/create-compressed-backup.md | 11 +++++++++-- docs/take-streaming-backup.md | 30 +++++++++++++++--------------- 2 files changed, 24 insertions(+), 17 deletions(-) diff --git a/docs/create-compressed-backup.md b/docs/create-compressed-backup.md index 5ef6999c1..2e1c474a8 100644 --- a/docs/create-compressed-backup.md +++ b/docs/create-compressed-backup.md @@ -6,7 +6,7 @@ To make a compressed backup, use the `--compress` option along with the `--backu ## Version updates -??? note "From Percona XtraBackup 8.0.34-29" +??? note "Percona XtraBackup 8.0.34-29 and later" Percona XtraBackup removes `qpress/QuickLZ` and moves the `ZSTD` compression method to [General Availability](glossary.md#general-availability-ga). With this version `ZSTD` becomes the default compression method for the `--compress` option. @@ -62,7 +62,7 @@ To make a compressed backup, use the `--compress` option along with the `--backu To decompress files, use the `--decompress` option. -??? note "From Percona XtraBackup 8.0.31-24" +??? note "Percona XtraBackup 8.0.31-24 to 8.0.34-29 " Using qpress/QuickLZ to compress backups is deprecated and may be removed in future versions. We recommend using either `LZ4` or Zstandard (`ZSTD`) compression algorithms. `ZSTD` compression algorithm is in [tech preview](glossary.md#tech-preview). @@ -76,6 +76,9 @@ To make a compressed backup, use the `--compress` option along with the `--backu $ sudo apt install qpress ``` + + + !!! note Enable the repository: `percona-release enable-only tools release`. @@ -144,6 +147,10 @@ To make a compressed backup, use the `--compress` option along with the `--backu 170223 13:00:39 completed OK! ``` +Using `--encrypt` might create larger backups than expected when used with InnoDB Page Compression. + +To avoid this issue with compressed backups, use the `--compress` option with the `--xbstream` option in Percona XtraBackup 8.0.31-24 and later. + The next step is to [prepare](prepare-compressed-backup.md) the backup in order to [restore](restore-a-backup.md) it. diff --git a/docs/take-streaming-backup.md b/docs/take-streaming-backup.md index 46f617f51..c557b078c 100644 --- a/docs/take-streaming-backup.md +++ b/docs/take-streaming-backup.md @@ -1,29 +1,29 @@ # Take a streaming backup -**Percona XtraBackup** supports streaming mode. Streaming mode sends a backup to `STDOUT` in the *xbstream* format instead of copying the files to the backup directory. +Percona XtraBackup supports streaming mode. Streaming mode sends a backup to `STDOUT` in the xbstream format instead of copying the files to the backup directory. -This method allows you to use other programs to filter the output of the backup, -providing greater flexibility for storage of the backup. For example, -compression is achieved by piping the output to a compression utility. One of -the benefits of streaming backups and using Unix pipes is that the backups can -be automatically encrypted. +This method enables you to utilize other programs to filter the backup output, enhancing flexibility in backup storage. For instance, compression can be achieved by directing the output to a compression utility. One advantage of streaming backups and employing Unix pipes is that backups can be automatically encrypted. -To use the streaming feature, you must use the `--stream`, -providing the format of the stream (`xbstream` ) and where to store -the temporary files: +## Version changes + +Using `--encrypt` might create larger backups than expected when used with InnoDB Page Compression. + +To avoid this issue with compressed backups, use the `--compress` option with the `--xbstream` option in Percona XtraBackup 8.0.31-24 and later. + +## Use streaming + +To utilize the streaming feature, you need to employ the `--stream` option, specifying the stream format (xbstream ) and the location for storing temporary files: ```{.bash data-prompt="$"} $ xtrabackup --stream=xbstream --target-dir=/tmp ``` -*xtrabackup* uses *xbstream* to stream all of the data files to `STDOUT`, in a -special `xbstream` format. After it finishes streaming all of the data files -to `STDOUT`, it stops xtrabackup and streams the saved log file too. +xtrabackup uses xbstream to stream all of the data files to `STDOUT`, in a +special `xbstream` format. After all data is streamed, xtrabackup stops and also streams the saved transaction log. -When compression is enabled, *xtrabackup* compresses the output data, except for the metadata, using the specified compression algorithm. Read about the supported compression algorithms in the [Create a compressed backup](create-compressed-backup.md) document. +When compression is enabled, xtrabackup compresses the output data, except for the metadata, using the specified compression algorithm. Read about the supported compression algorithms in the [Create a compressed backup](create-compressed-backup.md) document. -Using *xbstream* as a stream option, backups can be copied and compressed in parallel. This option can significantly improve the speed of the backup process. In case backups -were both compressed and encrypted, they must be decrypted before they are uncompressed. +With xbstream, backups can be copied and compressed simultaneously, significantly speeding up the process. However, if backups are both compressed and encrypted, they need to be decrypted before uncompressing. |Task | Command | |---------|------|