Skip to content

Commit

Permalink
PXB-3357 PXB-3357 Document that xtrabackup --decompress requires the …
Browse files Browse the repository at this point in the history
…zstd to be installed (8.4) (#319)

modified:   docs/prepare-compressed-backup.md
  • Loading branch information
alina-derkach-oaza authored Sep 12, 2024
1 parent 482a3aa commit f546dc9
Showing 1 changed file with 45 additions and 11 deletions.
56 changes: 45 additions & 11 deletions docs/prepare-compressed-backup.md
Original file line number Diff line number Diff line change
@@ -1,20 +1,54 @@
# Prepare the backup
# Decompress and prepare a backup

Before you can prepare the backup you’ll need to uncompress all the files.
Percona XtraBackup has implemented `--decompress` option
that can be used to decompress the backup.
Before you can prepare the backup you need to decompress all the files.

```{.bash data-prompt="$"}
$ xtrabackup --decompress --target-dir=/data/compressed/
```
## Decompress a backup

* To decompress backups made using `LZ4` or `ZSTD` compression algorithm, install the corresponding package.

`Install on APT systems`

=== "Install the `lz4` package"

```{.bash data-prompt="$"}
$ sudo apt install lz4
```

=== "Install the `zstd` package"

```{.bash data-prompt="$"}
$ sudo apt install zstd
```

!!! note
`Install on YUM systems`

=== "Install the `lz4` package"

```{.bash data-prompt="$"}
$ sudo yum install lz4
```

=== "Install the `zstd` package"

```{.bash data-prompt="$"}
$ sudo yum install zstd
```

* Use the `--decompress` option to decompress the backup.

```{.bash data-prompt="$"}
$ xtrabackup --decompress --target-dir=/data/compressed/
```

!!! note

`--parallel` can be used with `--decompress` option to decompress multiple files simultaneously.
`--parallel` can be used with `--decompress` option to decompress multiple files simultaneously.

Percona XtraBackup does not automatically delete compressed files. To clean up the backup directory, use the `--remove-original` option. If you do not remove the compressed files, these files will not be copied or moved to the datadir when using the `--copy-back` or `--move-back` options.

Percona XtraBackup does not automatically remove the compressed files. In order to clean up the backup directory you should use `--remove-original` option. Even if they’re not removed these files will not be copied/moved over to the datadir if `--copy-back` or `--move-back` are used.
## Prepare the backup

When the files are uncompressed you can prepare the backup with the `--prepare` option:
When the files are decompressed you can prepare the backup with the `--prepare` option.

```{.bash data-prompt="$"}
$ xtrabackup --prepare --target-dir=/data/compressed/
Expand Down

0 comments on commit f546dc9

Please sign in to comment.